fbpx

Link a Gravity Form radio button option to focus on a specific field

Place this snippet in an HTML field in your form:

<script>
jQuery( document ).ready(function() {
	jQuery('input:radio[name="input_2"]').change(
	    function(){
	        if (jQuery(this).is(':checked') && jQuery(this).val() == 'Enter Amount') {
	            jQuery('#input_2_1').focus();
	        }
	    });
   
});
</script>

Customize the above code according to your specific fields.

To add a regular text link that focuses on a specific field use the following code (add as a link and customize):

href="javascript:document.getElementById('input_2_1').focus()"
Shopping Cart