Hi @katie4449 !
-
Create a new page in Wix and add a form element to the page.
-
Add a single radio button field to the form element. To do this, click on the form element and then click on the “Add Field” button. Select “Radio Button” from the list of available fields.
-
Edit the radio button field and add the options that you want to display. To do this, click on the field and then click on the “Edit Field” button. In the “Options” section, enter the options that you want to display, one per line.
-
Assign a unique value to each option. To do this, click on each option and then enter a unique value in the “Value” field.
-
Add a submit button to the form element. To do this, click on the form element and then click on the “Add Button” button. Select “Submit Button” from the list of available buttons.
-
Edit the submit button and set the action to “Custom”. To do this, click on the button and then click on the “Edit Button” button. In the “Button Link” section, select “Custom” from the list of available actions.
Try out this:
if ($w('#radioButtonGroup1').value === 'option1') {
wixLocation.to ('http://www.example.com');
} else if ($w('#radioButtonGroup1').value === 'option2') {
wixLocation.to ('http://www.example2.com');
} else if ($w('#radioButtonGroup1').value === 'option3') {
wixLocation.to ('http://www.example3.com');
}