Skip to content

Using conditional logic in Gravity Forms to check if a field is empty or not

Using Gravity Forms conditional logic you can show or hide fields based on values of previously filled fields, determine when to use a form confirmation or notification and also when a feed is fired or not (e.g. Stripe, PayPal, MailChimp, etc…).

In certain use cases what you really want to check is not a concrete value but if the field is just empty, no value entered, or the opposite, if it contains any value.

Doing this it’s very easy and I would say obvious. But despite this, it’s very common to see people wondering how to do this.

All you need to do is to use the is or is not operators and leave empty the input for the value in your condional logic rule! :)

It’s not clear yet? Please take a look to the following screenshot:

Show a field only if “Text Field” is not empty

In the above screenshot, you can see a conditional logic rule to show a field in the form only if another field labeled as “Text Field” is not empty. As said above this same logic can be applied to notifications, confirmations or feeds. So you can, for example, show a specific confirmation or process a Mailchimp feed only if certain field in your form is not empty.

The above logic would apply to any field type where the user can type a value, like single line text, paragraph, email, etc…

For choices based fields (e.g. a radio buttons field), you can’t use that. For these field types you would need to add an “is not” rule for each choice:

Gravity Forms Conditional Logic for no choice selected.
Show a field only if no choices were selected in a Radio Buttons field.

With the logic in the above screenshot, the field where we have configured it, will be shown only if the user didn’t selected any choice in the Radio Buttons field. For a Drop Down field whe you have set the Placeholder setting, you can just add one “is not” rule using the placeholder as value.

Published inGravity Forms


  1. Matt Matt

    I was hung up on that. This cleared it up. Thanks!

  2. symin symin

    what if I wanted to show a HTML error message if my value from dropdown A is lower than the value from Dropdown B? My example is I have an age range dropdown. 2 dropdowns.
    It’s an age range for 2 dropdowns..
    Both are from 18 to 99

    if Dropdown A is 50 while dropdown B is 45, it should then show my error message.

    Thank you

    • Samuel Aguilera Samuel Aguilera

      The scenario you described would require two different groups of logic rules. This is not supported out of the box. But there’s a third-party add-on that you could try.

Leave a Reply

Your email address will not be published. Required fields are marked *