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 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:
- 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 verses 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.
- 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.