Branch Logic Blocks

The Branch Logic blocks in LegalServer allow you to display subforms based on existing data or a user's selection. For example, if Homeless = "Yes", then display 4 additional fields.

The Branch Logic block works with lookup and boolean (Yes/No) fields. It does not work with date, number, and text fields. The Conditional Branch Logic Form Include block works with a few pre-defined number fields.

Video: LegalServer Administrators - Branch Logic Tools

See also: Guided Navigation, known colloquially as branch logic on steroids.

In this Article:

Branch Logic Block

Place the Branch Logic block on a form as you would any other block. Select the Toggle Field, optionally mark the field as Required, optionally set a Default value for the field, optionally hide it, then select the branch logic form(s) to present (if any) for each possible selection the user can make. Here is an example with the options shown for a Yes/No question:

In the example above, the toggle field, "Has Applicant been to DEMO before", is a Yes/No field. With this configuration, if the user selects No when filling out the primary form, then nothing else would happen. If the user selects Yes, then the display will expand to show the branch logic form named "Applicant has been here before". That form can contain fields, instructions, and other elements.

The Default Value option in the block will not override an existing value for the toggle field. In the example, if the toggle field has not been set when the primary form is displayed, it will default to "No". However, if that field had previously been set to "Yes" (in another form or if the user is returning to the same form where it was set to Yes earlier), then the Default of "No" will not override the "Yes" value. If you want the configured Default Value to override an existing value, check the box for Override Existing Value with Default.

The Read Only Subforms option allows branch logic forms to be displayed, but not saved.

The Required option determines if the toggle field is required on the primary form.

The Hidden? option hides the toggle field, and will display nothing on the primary form unless the block has been configured with a default value for the toggle field, or the toggle field has been set previously.

If the toggle field you select is a Lookup field instead of a Yes/No field, you could select a branch logic form for each possible value of that particular lookup field:

The toggle field can also be a multi-select Lookup field. In that case, the selections the user makes on the primary form will display as many branch logic forms as you have defined for those selections.

Branch Logic Forms

Branch Logic forms contain elements like other forms (fields, instructions, blocks, etc.). You can display as much additional information as you want inside the parent form. You create and edit branch logic forms in the same way you work with intake, auxiliary, and other forms, on the process management page (Admin > Processes, Forms, and Profiles).

Branch Logic Block on Branch Logic Forms

You can place a Branch Logic block on a branch logic form (for a form within a form within a form), but will need to guard against a circular setup - a form that branches to another form, but that form branches back to the first branch form, etc.

Branch Logic Example

You might want to ask applicants if their primary language is English. If the response is Yes, you want the form to display the standard Language dropdown with English pre-selected. But if the response is No, you want the form to display the standard Language dropdown (with no language pre-selected), and also ask additional questions like what the applicant's primary language is, their level of proficiency in English, and so on. To accomplish this, you would:

  • Create a field for the initial Yes/No question "Primary Language is English" (if one doesn't already exist).
  • Create a branch logic form for the Yes response on the Admin > Processes, Forms, and Profiles. Add the Language field to this form and set the default value as English.
  • Create a branch logic form for the No response. Add the Language field to this form, as well as any additional fields, instructions, and blocks necessary to collect any additional information.
  • Add the Branch Logic block as an element on your primary form (in this example, probably an Intake form). Expand the Branch Logic block and set the options: select your Yes/No field for Toggle Field, and the appropriate branch logic forms for the Yes and No responses.

Note how you need to build in reverse: create/decide on a toggle field, build the branch logic forms, then place the Branch Logic block on the parent form (after you have the pieces the block needs).

Branch Logic based on Existing Information

Although branch logic is often used during intake to make different forms appear based on a user's selection, it can also be used for fields that already have a selection made, whether earlier in an intake or after a case is accepted.

For example, a site could have an auxiliary process called "Additional Questions" that appears on open cases. The form called by that process would contain a branch logic block with a toggle field for a value that has already been entered (legal problem code, funding code, county of residence, a custom field, etc.) As soon as a user clicks the "Additional Questions" link, the branch logic block would display the appropriate questions (the branch logic form configured for that legal problem code, funding code, etc.). If a site has several sets of questions based on a single field, one link could replace several separate links.

The Hidden option could also be used so that the user could not, on that form, accidentally change the toggle field value.

Branch Logic Form Toggle Button

This block is useful in "Show/Hide" situations to display, or not, a branch logic form. It allows you to avoid creating an unnecessary Yes/No toggle field for the 'full' Branch Logic block.

In the example, an agency wants to display a branch logic form if an applicant has previous applications, but has no need to create a "Previous Applications" field and store a Yes or No value for it.

The above configuration will initially display on a form like this:

And like this after the "Show" button is clicked:

Conditional Branch Logic Form Include

Allows a branch logic form to be displayed based on one or more conditions. For example, the form could be displayed based on a matter's percentage of poverty, legal problem code, and county of residence. The conditions can be joined by the AND option (all conditions must be met) or the OR option (the form is displayed if any of the conditions are met).

See Conditional Branch Logic Form Include for more information.

Tips and Tricks

Branch logic is an excellent tool that allows admins to customize forms and processes for their users, and we recommend practicing building out various branch logic forms on your demo site to get a feel for how that works. For tips, and step-by-step instructions, please see our Branch Logic Tips and Tricks doc.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us