Gravity Forms: Clear Default Radio Button Option and Preserve Conditional Logic
While creating a complex four page form using Gravity Forms I ran into a problem. For testing purposes I had set a radio button option as the default selection. My problem arose when I needed to clear that default selection and add additional options. Clicking on the set default radio button a second time does not remove the selection. This is due to the inherent functionality of a radio button: one selection from a set. As opposed to a series of checkboxes: select as many options as you would like.
The simple solution, in most cases, would be to delete the radio button option and add it back in without setting the default. The problem with solution in my case is that there are 28 fields set further on in the form which make use of conditional logic for this field. By removing it, all of those options would need to be set back up.
Solution to Preserve Conditional Logic:
After a few moments of searching in Google and not finding an answer to my specific problem, I had an idea. I added a new option to the radio button set, named it Test, set it as the new default option, and then removed it from the list. This left no default selected and preserved my conditional logic.
It is my hope that by writing and sharing this brief blog post I may be able to help others who may find themselves in a similar situation. Remember, we’re all in this together!
If you found this information useful, consider leaving a brief comment below letting me know.
Good luck in your ventures!
Øystein • February 28, 2017 •
Brilliant. This helped me 🙂
Rick D'Haene • March 6, 2017 •
Glad to hear it and happy to help. 🙂
Christina • March 22, 2017 •
Thank you! This was helpful for me. Simple and easy.
Darshak • April 11, 2017 •
🙂 thank you rick.. it’s working fine.. you solved my problem..
Mike • August 31, 2017 •
Hacktastic Perfection. Thanks!
Debwork • September 6, 2017 •
Your simple elegant solution to clearing Gravity form radio button is beautiful – thank you so much!
Migs • October 10, 2017 •
This fooled me until I found this solution, and it’s so obvious :-/
Incidentally, you don’t even need to name the new field, just create it, make it default and delete it.
Mike • January 21, 2018 •
Great suggestion and worked a treat. Why didn’t I think of that?:)
Sheldon • March 5, 2018 •
You genius, years later and this trick is still required and still working!
salparadi • May 1, 2018 •
Thank you… crazy that they don’t have an option to do this.
harry • May 16, 2018 •
Another thanks from me
Clint • July 10, 2018 •
Saved me some needed mental energy, thanks!