When designing Forms in Laserfiche it is important to take screen real estate into consideration. You could show or hide fields based on a previous selection. For example, you have a New Hire On-boarding form with a question “Do you want Direct Deposit?” where the user selects “yes” or “no”. If the user selects “yes” additional fields appear for the user to enter bank account information. If the user selects “no”, there is no need to show the other field(s). In order to do this, you would first need to create Field Rules. Here is how you do that:
Creating Rules to Show or Hide Fields
Field rules determine how fields will interact in the form and allow you to show or hide fields based on conditions. The number, to the left of the rule, represents the order of evaluation of multiple rules. A larger number overrides a smaller number.
To create a field rule
- Open a form in the form designer and click Field Rules.
- Click New Field Rule.
- In the first row, select Show or Hide from the first drop-down menu and select the field you want displayed or hidden from the second drop-down.
- Save or ignore the data in the field when it is hidden using the following options:
- Ignore the data when the field is hidden: Select this option to not retain the data in the field. For example, a form has an Age field and a Parent Signature field. The form designer can ignore the parent signature data if the user is 18 or older, because the data is valuable only when the user is underage. In this case, the form designer would select this option to ignore the data, making the field value blank when submitted. Because the field is ignored, when the form is being validated for configuration errors, the Forms service does not check that the field is configured correctly.
- Save the data when the field is hidden: Select this option to retain the data in the field. For example, a form has two shown Number fields and one hidden Number field. The form designer wants to retain the sum of the two shown Number fields in a hidden Number field and then save the result in the hidden Number field. In this case, the form designer would select this option to save the data. Because the field data is saved, the Forms service still checks that the field is configured correctly when the form is being validated for configuration errors.
- In the second and third rows, define the rule to hide or display the specified field. Click the plus sign to add multiple rule definitions or x to remove a rule definition.
- When you are finished, click Save.
Here is another example where a user could request additional information about a company.
Please see Forms Video Tutorials (scroll down to “Showing and Hiding Form Fields“)