Prerequisite Topics


 

Conditional logic is a powerful tool for making your forms more dynamic and intuitive. Enabling conditional logic allows you to create rules to show or hide fields based on values entered in another field. Essentially, a field will only show if a certain choice is selected in another field.

For example, our Request A Plugin form uses conditional logic. If you select I know what plugin(s) I need, then a new field with list of plugins will appear and you can make your selection. That extra field appears on the condition that you know which plugin you want. Otherwise, it remains hidden.

Conditional Logic Best Practices

Performance issues have been identified in forms that utilize a large amount of conditional logic. To minimize delays while conditional logic fields process, it is best to ensure you use these tips:

  1. If you want to show or hide more than one field based on a condition, it is best to group them using a Section and have one condition for the Section itself. That way, only one check must be completed for the section versus a check for each field.
    • You can make the label for the section empty which essentially makes the section invisible.
    • Remember to start a new section after the last field that should be included in the conditional logic group.
  2. You can also use conditional logic with pages themselves if that would work for your form.

For a more in-depth explanation of how to use conditional logic with Gravity Forms, check out their article: Enable Conditional Logic. To see conditional logic at work, see our example form: Conditional Logic.

More resources:

Conditional Logic in Gravity Forms Confirmations
Setting Up Conditional Payments in Gravity Forms