Default Values

SKIP AHEAD TO 
What is a default value?
Why should you use default values?
How to set up default values


What is a default value?

A default value is a value that is prefilled within user input fields by default in the FORM block. End users are still able to overwrite the default value in the FORM page. The user input fields that have an option to set default values include Text Inputs, Number Inputs, Drop-down, Radio Buttons, Checkbox, Slider and Date.

Note: By design, default values will only be functioning in FORM blocks. They will not be functioning in COMPs, routing, widgets etc.

 

Why should you use default values?

Default values allow for minimal data entry by end users as much as possible. For example, if the App requires to collect today's date, the default variable for the date variable can be set as today to avoid the end user from having to manually select the date.

 

How to set up default values

There are 2 ways you can use to set default values - set by value or by matching variables:

  1. Set by value

    Set by value options include:

    User Input Field Type

    Default Value Options
    Text Input Static text
    Number Input Static number
    Dropdown Select option created
    Radio Select option created
    Checkbox Checked or unchecked
    Slider Static number
    Date Check or uncheck "Set default value as today" option

    a) Add any user input field into the FORM block (e.g. Text Input)

    b) In the “Set Default Value” section in the Property Editor, select the "By value" option. This option should be selected by default

    _Draft__V1.21_Wiki_2020-12-23_14-53-55.png

    c) Since we are using a Text Input field in this example, enter a value in static text which you wish to prefill the input field by default
    _Draft__V1.21_Wiki_2020-12-23_14-55-03.png

  1. Set by matching variable

    a) Add any user input field into the FORM block (e.g. Text Input)

    b) In the “Set Default Value” section in the Property Editor, select the "To match variable" option

    _Draft__V1.21_Wiki_2020-12-23_14-56-01.png

    c) Using the dropdown, select a text variable in previous FORM blocks which you wish to prefill the Text Input field by default.

    _Draft__V1.21_Wiki_2020-12-23_14-56-43.png

    Note:
    You can only match variables of the same user input field type. I.e., Text Input fields can only match with other previous Text Input fields (I.e., text variables).