Skip to main content

Documentation

Step 3: Setup Application Form Fields via Triggers

The triggers object describes the conditions for displaying and hiding fields in the application form. For example, the State field should be displayed when the user enters US as the country address. It includes the following objects and fields:

  • map - Indicates the relationship between the watchable fields and the affected fields.

  • section - ID of a specific section of the application. String starting with sect_.

  • triggers - This object indicates the specific change that needs to be done on the field. Each triggers object includes the following fields:

    • Triggered field that may be changed according to the value of the watchable field. string starting with sect_

    • default - the default setting of the field that includes one or more of the following fields:

      • is_required - Boolean. Indicates whether the field is required and cannot be left blank.

      • is_shown - Boolean. Indicates whether the field is displayed on the application.

      • name - Name of field.

      • list_of_values - Valid list of values.

      • is_read_only - Boolean. Indicates whether the field is read only.

      • description - The description of the field.

        Note

        triggers is also the name of the parent object.

    • conditions - Describes the conditions for changing the field’s default setting. Includes the following fields:

      • value - Indicates the value of the specified watched field that triggers a change in the default setting of the field.

      • input_type - Specifies the type of input. Values include:

        • text 

        • number 

        • select 

        • dropdown 

        • file 

        • input 

        • textarea 

        • checkbox 

        • radio_button 

        • date 

        • phone_number 

        • check_box 

        • email 

        • multiselect_dropdown 

        • dropdown_check_box 

    • Operator - The operator of the condition. Can be EQUALS, >=, <=> or <.

    • changes - Indicates the changes to the specified field when the condition is met. Includes one or more of the following fields:

      • is_required - Boolean. Indicates whether the field is required and cannot be left blank.

      • is_shown - Boolean. Indicates whether the field is displayed in the application.

      • name - Name of field.

      • list_of_values - Valid list of values.

      • is_read_only - Boolean. Indicates whether the field is read only.

      • description - The description of the field.

  • watching_fields - All the fields that need to be listened to for changes. 

Example:

image3.jpg
Detailed Example for Displaying/Hiding Field

Setup the application fields and sections according to the triggers configuration. The triggers mechanism indicates that additional fields should be displayed or hidden when they are displayed. For example, when an applicant selects the country US, the State field should also be exposed and filled in. This is how the triggers indicate this specific setting:

  1. The watching_fields object indicates that the field address.country of application section sect_72ea99cfc98f48e5b8de3c3c4cf3556c has related fields that are dependent on its value.

    image1.png
  2. The related map object indicates that three fields are affected by the above watching field in the sect_72ea99cfc98f48e5b8de3c3c4cf3556c section. The first affected field in the list is address.us_state.

    image2.png
  3. The triggers object indicates the following setting and conditions for the

    address.us_state field in the sect_72ea99cfc98f48e5b8de3c3c4cf3556c section: 

    1. By default the field is not displayed as indicated in these fields: 

      image4.png
    2. The conditions object indicates that when the value of address.country is US, then the address.us_state field must be displayed:

Below is the entire trigger details for address.us_state field in the sect_72ea99cfc98f48e5b8de3c3c4cf3556c section: 

re.png

Therefore, the design of the application for this field in this specific section should be implemented in the following fashion: By default, in section sect_72ea99cfc98f48e5b8de3c3c4cf3556c, the address.us_state field should not be displayed. When the user selects US as the value of address.country in the same section then the field address.us_state should be displayed and is required to be filled in by the applicant.