Set up dynamic form submission redirect based on radio button selection

@michaelstrauss307 wow, thank you so much for the detailed reply! It worked! I had to add a couple more things since I was using a full form vs just form elements, but I figured it out. For those wondering, here is the final code that worked when clicking a form button:


import wixLocation from 'wix-location';

export function submitForm_click(event) {

if ($w('#radioGroup6').value === 'value1') {
    wixLocation.to ('http://www.example1 .com');
} else if ($w('#radioGroup6').value === 'value2') {
    wixLocation.to ('http://www.example2 .com');
} else if ($w('#radioGroup6').value === 'value3') {
    wixLocation.to ('http://www.example3 .com');
}

}