Gravity Forms Conditional Logic Doesn’t Work

Having issues with gravity forms conditional logic?

After hours of searching on the web for tips, how-to’s, and blog posts, I came up with my own solution. A simple little jQuery snippet that you can use to add conditional logic to your gravity form.

Navigate to the form in question and open up chrome developer tools (firebug, etc.). Find the item you want to enhance with conditional logic and save the ID, you will need that later. In my case, I have a single broken radio button.

chrome-developer-tools

input-highlighted-chrome-developer-tools

Chrome developer tools does a nice job of highlighting the input we found and the ID is spelled out for us already.

$("input").change(function(){	
	if($("#choice_6_1").is(":checked")){
	  $("#field_18_11").show(); 
	} else {
	  $("#field_18_11").hide();
	}
});

Basically what’s happening here is… whenever an input is updated, the script checks if the updated input is my ID #choice_6_1 if it is, show #field_18_11, if not.. hide #field_18_11. Simple as that. You can add as many IDs as you want to the script. I know that finding and typing out every ID would be a huge pain. This little script won’t save the day on every occasion. I only needed to change one item with conditional logic, so this work around saved me a bunch of time searching around on the web.