Gravity Forms Conditional Logic Example

Goal:

When the user selects “1” from menu A and “0” from menu B, menu C automatically selects value “D” and/or changes the available values that can be selected based on the combination of the first two values.


{Submit button removed.}

How To:

Configure an instance of Menu C with the default settings, then duplicate it (Menu C2) and set the default settings for Menu C2 to what you want when 1 and 0 are set by placing a dot in the corresponding radio button under the General tab. Go to the Advanced tab for Menu C2 and place a check in the Enable Conditional Logic box. In the fields that display select: Show, and All. Click the + button to add a second condition and, in the first section, select Menu A, is, 1. For the second condition, select Menu B, is, and 0. This is telling the Menu C2 field to only display on the form if Menu A is set to 1 and Menu B is set to 2.

Next, go into the Advanced tab for Menu C and place a check in the Enable Conditional Logic box. In the fields that display select: Hide, and All. Click the + button to add a second condition and, in the first section, select Menu A, is, 1. For the second condition, select Menu B, is, and 0. This is telling the Menu C field to hide itself if Menu A is set to 1 and Menu B is set to 2.

In Summary:

This will replace the Menu C field with the Menu C2 field (which has a specific default set). There is no reason why these two fields cannot share the same name. I’ve labeled them uniquely to help with this example.

Also, if your goal was to hide specific options based on the previous combination of selections, simply remove the options from Menu C2. In the example above, I have removed option B from Menu C2.

Get in touch if you would like support with your Gravity Forms implementation or if you’re considering a new project.

About Rick D'Haene

Rick D'Haene is a self-taught web developer, with a degree in website design, who has extensive knowledge of internet marketing and organic search engine optimization (SEO). He and his lovely wife Melissa reside in Bellingham, Washington, and have a few fun pets to keep them company.

Find me here: Twitter /Facebook /Google+ /

    Leave a comment

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>