Controlling Visibility and Editability in your Form

Controlling Visibility and Editability in your Form


You can control when sections of your form are visible and editable and who can see and edit which sections using the visible, enable, and read only calculations in the right panel of the form designer. This is important for implementing controls on who should be filling out portions of the form if it will be worked on by multiple people and when values can be changed. 


Visibility

There are two ways to control visibility on your form, a visible calculation or an enabled calculation and “hide while disabled” switch on.


Visible Calculation

You can set the visibility calculation in the presentation properties tab on the right panel. The visible calculation can be set to “true” meaning the field will always be visible, “false” meaning the field will always be hidden, or a calculation to set conditional visibility. 

For example, if you have a section for a reviewer to sign off on the form and you don’t want the inspector filling out the form to see that section you can use a visibility calculation to achieve this. One way is to set the calculation so that the section is only visible if the user is in the “Reviewer” group that should be completing the review sign off. Another way would be to make the section visible only if the status is “in review”. There is no right or wrong condition to use to set visibility as long as it aligns with your business process of who should be filling out what sections of the form at what time. You can apply this calculation at the individual field level or at the section level. If applied to a section, all the fields inside the section will inherit the visible condition. 


Hide While Disabled Switch

Similarly, you can utilize a combination of the enabled control, set in the conditions tab on the right panel, along with the “hide while disabled” switch in the presentation properties tab of the right panel turned on. The enabled calculation can be set to “true” meaning the field will always be enabled, “false” meaning the field will always be disabled, or a calculation to set conditional enablement.  If you have an enabled calculation and “hide while disabled” is switched off, if the enabled condition is not met the field will still be shown but the user will not be able to fill it out. If the “hide while disabled” switch is turned on, if the enabled condition is not met the field will be hidden from the form. You can apply this calculation/switch combination at the individual field level or at the section level. If applied to a section, all the fields inside the section will inherit the condition. 


When to use visible vs. hide while disabled

There is no right or wrong choice to control visibility on your form, however you should take the following into account when you decide which way to implement visibility: 
  1. Does this field need to show on the PDF of the form: Whether or not a field is shown on the PDF is derived from the visible calculation, not the enabled calculation. 
  2. Is any validation on the field applicable if the field is hidden: If a field is disabled any validations on that field will not run. If a field is only not visible and not disabled, then the validations will run. 


Editability

There are two ways to control editability on your form, a readonly calculation or an enabled calculation.


Readonly Calculation

You can control whether or not your field is editable in the readonly calculation on the conditions tab on the right panel. The readonly calculation can be set to “true” meaning the field will never be editable, “false” meaning the field will always be editable, or a calculation to set a condition for when the field should be editable. You can apply this calculation at the individual field level or at the section level. If applied to a section, all the fields inside the section will inherit the readonly condition. 


Enabled Calculation

Similarly, you can control whether or not your field is editable in the enabled calculation on the conditions tab on the right panel. The enabled calculation can be set to “true” meaning the field will always be enabled, “false” meaning the field will always be disabled, or a calculation to set conditional enablement.

When to use readonly vs. enabled

There is no right or wrong choice to control editability on your form, however you should take the following into account when you decide which way to implement editability:

  1. When you use enabled over readonly, then you have the option of turning on the “hide while disabled” switch to hide the field


When to utilize conditions for editability

Setting conditions on when a field is editable or not is very important to ensure the right data is maintained on the form. Here are a few examples of when you should use a readonly calculation to control field editing: 

  1. If the form has been sent to a reviewer, ensure all the fields initially populated by an inspector or technician cannot be modified by that reviewer. The best way to achieve this is a readonly calculation looking at either the group the user is in or the form status on the sections filled out by the inspector/technician. 
  2. When the form is created and data from another system like work order or GPS location that should never be modified by a user. The best way to achieve this is setting the readonly condition to “true” on the individual fields populated from the other system. 
  3. When the form has been completed and in the final workflow status the entire form should be uneditable. The best way to achieve this is to set a readonly calculation on the entire form looking at the form status. You can select the entire form by clicking in the top right corner of the editing space.