GH-Elements

Duration

Duration is a gh-element that allows to set some time value. It is useful when the user needs to determine when for example a task should be completed or how long the survey takes.

Value Format

The duration value is the set time in milliseconds. In application it is saved as a string type data.

{
    "field_value": "900000"
}

User can enter the value with the help of Time Picker.

Time Picker

This is the pop-up window that allows users set the time of duration. There are two fields that allows to enter hours and minutes. It also has two buttons that allow you to clear the field and close the picker with the value saved, respectively.

Time picker of duration

Element Options

Duration has two type of settings. Despite that, it has not a big number of options.

Field Settings

Duration field settings only contains standard options: Field Name and Name Space.

Settings of duration element

Default Value Settings

As you may have gathered, you can set a default value for duration element. These settings will help you.

Settings of duration default value

Name Description
Use default value allows to use default value
Default value allows to set a default value

Default value

The default value is entered with the help the same time picker. Accordingly, you can enter any value you like.

Element Style

The style of duration element can be configured with the help of standard options about that you can read in Setting Overview. Also, read about interpretation below.

Style of duration element

Data Model

The data model of this element contains only values of default options and interpretations, so it is quite simple.

{
    "data_model":{
        "default_value": "any default value",
        "interpretation": [],
        "use_default_value": false
    }
}
Name Type Description
default_value string contains default value
interpretation array contains all duration interpretations
use_default_value boolean shows whether the default value is used

Filtration

The duration element can be filtered out by filters what compare full values:

Interpretation

There are only two interpretations for this element.

Types of duration interpretation

Default

This one allows to update duration value with the help of time picker which appears after clicking on the field.

Plain Text

The interpretation allows to display the set value and does not update it.