Why Use Form Logic?
When a form does not use form logic, you can choose to make fields required, hidden or locked (read-only) - but whatever you pick will apply in the same way to every record that is created. In the "Client Intake" record example above, there is no way to tell the user that they must fill out school information when the client is a child. Or, if the client is an adult, there is no way to tell the user to skip the school information, and instead fill out the employment information.

Form logic allows you to add conditional rules to a form that apply in very specific cases. Fields can become hidden or un-hidden, required or not, locked or unlocked, use various look up lists depending on other field values, set a value based on other field options, or highlighted based on what your users fill out.

 

What Happens to Data When Form Logic is Applied?

Form logic does not, and will not, delete or change data that has been entered into a form.

What form logic can do is show or hide data. Form logic can reveal data fields that are required to be filled in before you can save the form. Form logic can change what your users see when they fill out a record. Form logic can determine the options user see for a dropdown. Form logic can set a value based on another fields value. 

Parts of Form Logic

Form logic is composed of rules. Each rule is composed of conditions and actions.
 

Rules

It can be helpful to think of each form logic rule as a "if/then" statement:

Condition: If [x] field has [y] answer,

Action: Then perform [z] action.

Conditions

Conditions: describes what fields and what kinds of data or which answers entered into a form will set a form logic rule in motion. A rule can have more than one condition.

In practice, a form logic condition is built in similar fashion to a filter in a report.

Actions

Actions: describe what will happen after the condition is met. Actions can be applied to a specific field or to all the fields in a section. A rule can have more than one action associated with it.

For a specific field, the choices for actions include:

- Require

- Unhide (make visible)

- Lock (make read-only)

- Highlight

- Use Look up List

- Set Value

For an entire section, the choices for actions include:

- Unhide

- Expand

- Scroll to

- Require All Fields Within

  • Lock All Fields Within

Adding Form Logic to a Form

1. Open the Administrator tab,

2. Select Standard Forms in the left hand menu.

3. Select the form you would like to edit and under the Actions tab, select "Edit."

Enable Form Logic

1. Open the green gear box at the top of the form.

2. Under "Settings," select "Enable Form Logic."

3. Click Apply and publish.

Edit Existing Fields on Form

Because form logic can make fields and sections required or un-hidden, it is a good idea to find these fields in your form before you start adding form logic rules - and make sure they are already hidden or that they are not already required.

In many cases, it is easiest to add rules and actions to an entire section at once. This can be a quick way to add form logic to an existing form.

Adding Form Rules

At the bottom of your form under the System Fields section, you will now see a section called "Form Rules."

1. Click "New Rule" to add a new form logic rule to your form.

2. Open the green gear box.

3. Edit the name.

4. "Show on Palette" means that the name of this rule will be visible to users as they are filling out your form. You can select to show it or hide it.

5. Click "Apply."

Deleting Form Rules

Forms cannot be published until all form logic rules have been configured. If you need to delete a rule:

1. Open the gear box to the right of the rule you would like to delete.

2. Select "Delete."

Adding Conditions

1. To add a new condition to your rule, select the "+" on the right hand side.

2. Select the field that will govern the actions to follow.

3. Select an operator, like Equals, Begins With, Contains, etc.

4. Add the answer.

5. Select Apply.

More Than One Condition

Form logic rules can have more than one condition. This can be useful if answers in more than one field can meet the conditions. In the example above, users can mark a client as a "child" or the client can have an age at intake of less than 18 - either one of these answers can indicate the client is a minor or a child.

Once you have added more than one condition to the same rule, a section called "Condition Logic" will appear. You can indicate if both the conditions need to be met ("1 and 2") or if either of the conditions need to be met ("1 or 2").

Deleting Conditions

To delete a condition,

1. Expand the black arrow next to the rule,

2. Click the gray text of the condition you would like to delete. This will open the condition for editing.

3. Select Delete

Adding Actions

1. To add a new action to your rule, select the "+" on the right hand side.

2. Choose if your rule will apply to one field or to an entire section.

3. Select the action.

4. Indicate which field or section it will apply to.

5. Select Apply.

More Than One Action

Form logic rules can have more than one action. This can be useful if the same condition, when met, should to be applied to more than one field or section on the same form. In the example above, if a client is identified as a child, then the "Child Data" section must be un-hidden (or visible) and the "Grade in School" field will be made required.

Deleting Actions

To delete an action:

1. Expand the black arrow next to the rule,

2. Click the gray text of the condition you would like to delete. This will open the action for editing.

3. Select Delete

Form Logic Tips and Tricks

1. Using form logic with an append only field: actions can only be triggered by what is in the editable text box portion of the field. This field would work best with form logic rules based on "is empty" or "is not empty."

2. Using form logic with a multi-select field (like a multi-select dropdown or checkbox): form logic rules will not work when based on "equals;" for best results, use "begins with" or "contains."

3. To deactivate a field which has been used in a form rule, first delete all form logic conditions and actions that apply to the field.

Did this answer your question?