Question Design

Property

Type

Description

key

string

Question identifier to be used in form data

label

string

Question title

controlType

string

input, select, truefalse, file

required

boolean

Whether question is required

pattern

string

Length of text

options

string

Sources for options of select control type

helperText

string

Help text to be put below question field

target

string

file, directory for file control type

multiple

boolean

Allow multiple selection for file control type

filter

FileFilter

File type filter for file control type

Text input

{
    "key" : "participant_id_number", 
    "label" : "Participant ID Number", 
    "required" : true, 
    "order" : 2, 
    "controlType" : "input", 
    "type" : "text", 
    "helperText" : "Participant ID number part, must be 3 digits, number only.", 
    "pattern" : "3"
}

You may also use any input type that is supported in the HTML Input Types.

Select

{
    "key" : "participant_id_prefix", 
    "label" : "Participant ID Prefix", 
    "required" : "true", 
    "order" : 1, 
    "controlType" : "select", 
    "options" : "__config::participant_id::prefix__", 
    "helperText" : "SN for screening visit; STP for enrolled."
}

The options value is used to retrieve data from study configuration. It must starts with __ and ends with __ . If this data is stored in nested field, these field names must be separated by ::.

File

{
    "key" : "file", 
    "label" : "Sample File", 
    "required" : true, 
    "order" : 1, 
    "controlType" : "file", 
    "helperText" : "HDF5 file", 
    "multiple" : false, 
    "filter" : [
        {
            "name" : "HDF5 file", 
            "extensions" : [
                "h5"
            ]
        }
    ]
}

Last updated

Was this helpful?