Setup Gravity Forms Conditional Confirmation or Notification Messages Based on Submitted Values

Have you ever wanted to have your confirmation or notification messages say different things depending on the submitted values?

Take the form below as an example:
Gravity Forms Form Editor Radio Button Option Field

Based on which option the user chooses, I’d like to display a different message when they submit the form, and the Gravity Forms conditional shortcode is just what I’m looking for.

The Gravity Forms conditional shortcode allows you to show different content depending on the values of the submitted form fields. In my example, I have a different message for each option the user can choose:
Gravity Forms conditional confirmation message

So here’s how to use them:

  1. [gravityforms action="conditional"
    Start with the shortcode name and the action, which is always “conditional”
  2. merge_tag=""
    Add the form field that has the value you want to check. You can insert the merge tag for the form field using the merge tag dropdown. Gravity Forms Merge Tag Dropdown
  3. condition=""
    Indicate the type of comparison you will be doing. The possible conditions are is, isnot, greater_than, less_than, contains, starts_with, ends_with.
  4. value=""
    Enter the value that you want to compare the submitted value with.
  5. ]
    Close the opening shortcode.
  6. After you close the opening shortcode, enter your desired content for this condition
  7. [/gravityforms]
    Finally, enter the closing shortcode
Putting it all together, we have:
[gravityforms action="conditional" merge_tag="{Field:1}" condition="is" value="desired value"]Show this content if the field is equal to the field value I specified earlier[/gravityforms]

You can add as many conditional shortcodes as needed in your message.



Questions? Email Me