You can use field visibility rules to dynamically show or hide specific fields on the entry page based on the values entered in certain fields. This ensures a clean and efficient data entry process, displaying only the relevant fields and improving data accuracy.
Field Visibility Rules can also be applied to Global fields, enabling you to control the visibility of fields inside a reusable global component.
When a Global Field with visibility rules is referenced inside a Content Type:
Field Visibility Rules are commonly used in forms to create a streamlined experience. Here are some examples:
Modular Block Example: In a Product Details modular block, you can define rules that show or hide fields within the same block. If Product Type is set to Physical, the Shipping Details fields in that block are displayed. If Product Type is set to Digital, the shipping fields in that block are hidden. Both the operand and target fields must belong to the same block, ensuring rules stay self-contained.
Group Field Example: In a Team Members group field marked as Multiple, you might want to reveal additional social fields per team member. For instance, when a user selects Has Social Links within one instance of the group, fields for LinkedIn URL and Twitter URL appear for that specific member. Rules apply per instance, ensuring that each team member’s visibility settings are independent.
Tip: Remember to create an entry to see the rule in action.
Note: Only the stack owners, admins, and users assigned to the developer role can create Field Visibility Rules in the stack. Refer to the Add a Field Visibility Rule document for detailed steps.
This feature improves form usability and helps ensure accurate data collection. By configuring visibility rules, you can tailor forms to meet specific content requirements.