---
title: "Step 3: Setup Application Form Fields via Triggers"
source_url: https://docs.rapyd.net/en/step-3--setup-application-form-fields-via-triggers.html
lang: en
---

# 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](image/img-cfc196e4a3a37dc152265607090f4410.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](image/img-678600558462da48ec94c464c6a7b921.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](image/img-41a35c2ec9eaf06748fd2511994cb11e.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](image/img-a7f68d23d261905f3b1b676477006bd6.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](image/img-7bc28ab1572cddb7c2c4e2a7cf6fa7b3.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.
