Try It Yourself: Make a Field Visible Based on a Rule
This video will teach you how to hide and show fields on-demand using Dependencies.
Try it Yourself
First, we'll add a checkbox field to the form.
- Right-click in the Form Outline panel, then choose Insert New Form Element > CheckBox.
- In the Properties panel, change the value for the Field Name property to 'Attend Meet & Greet?'
- Find the Field Values property, then click the 'edit values' icon.
- The Field Options dialog opens to let you edit the checkbox options.
- The Field Options dialog opens to let you edit the checkbox options.
- In the first row, enter 'Yes' for the Data Value and for the Display Value.
- Press the <Tab> key to move between cells.
- Press the <Tab> key to move between cells.
- Click the Save button to close the Field Values window.
Next, we're going to add an image upload field that will show only when the 'Attend Meet & Greet?' checkbox is selected. This will be our dependent field.
- Right-click the 'Attend Meet & Greet?' field in the Live Edit Preview panel, then choose Insert New Form Element > File Upload.
- In the Properties panel, change the value for the Field Name property to 'HeadShot.'
- Change the value for the Show Image Preview property to 'true' to display a preview of any uploaded image.
Finally, let's add our dependency so this field is only visible when we need it.
- Select the HeadShot field in the Form Outline panel.
- In the Properties panel, click the 'edit values' icon for the Dependency property to open the Dependency Editor window.
- Click the Click to Edit Rule button.
- The Matching Options fields display.
- The Matching Options fields display.
- Use the Matching Options fields to create the condition under which the 'HeadShot' field will display.
- Choose 'Attend Meet & Greet?' from the left drop down.
- Choose 'equals' from the center drop down (this is the matching criteria).
- Choose 'Yes' from the right drop down..\
- Click the Matching Options - Save button to save the condition and close the Matching Options fields, then click the Dependency Editor - Save button to close the Dependency Editor window.
Now when we the 'Attend Meet & Greet?' checkbox is selected and unselected, the 'HeadShot' field is shown and hidden on demand according to the rule we created.
Have more questions? Submit a request
Please sign in to leave a comment.
0 Comments