Make a radio button leave the form and open a new URL?

I would like to make one of the choices of radio button options click out of the form and go to a different URL. Is this possible?

Thank you for any help or leads.

Yes, it is possible to make a radio button option in a Gravity Form, click out of the form and go to a different URL. This can be achieved using the Gravity Forms HTML field.

Here’s how you can do it:

  1. Add a new field to your form and select HTML as the field type.
  2. Add the code for a radio button group in the HTML field, including the desired options and values.
  3. For the option that you want to redirect to a different URL, add an onclick attribute to the input tag, with the value set to window.location.href = http://your-url.com;. Replace http://your-url.com with the actual URL you want to redirect to.
  4. Save the HTML field and preview your form. When the user selects the radio button option with the onclick attribute, they will be redirected to the specified URL.

To make this process easier, here’s an example of what the HTML code for the radio button group might look like:

<input type="radio" name="example" value="option1">Option 1<br>
<input type="radio" name="example" value="option2" onclick="window.location.href = 'http://your-url.com';">Option 2 (redirects to http://your-url.com)<br>
<input type="radio" name="example" value="option3">Option 3

Following these steps, you can easily create a radio button option in a Gravity Form that redirects to a different URL. I hope this helps!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.