How to run a Javascript function when a input, a Checkbox or a radio button is modified [RESOLVED]

Hello everyone.

In our form we would like to run a javascript function when a input is modified. Normaly in HTML we just set an “OnChange”, or with javascript with AddEventListener, but we don’t know if this option could make an error.

How would you do it?

Thank You

Hi Miguel. This is not specific to Gravity Forms. It applies to any radio button or checkbox element on a web page.

If you search Stack Overflow, you will find many possible approaches to this issue.

Example search

Once you have your method, you can use any of these methods to add the JavaScript to your form: Where Do I Put This Code? - Gravity Forms Documentation

If you have any other questions, please let us know.

1 Like

Thank you, Custom JavaScript add-on it solved the problem

1 Like