GH-Elements

Number

Number is an element that takes string type data and converts it to rational numbers, including:

  • Negative numbers
  • Decimal numbers
  • Natural numbers

Decimal numbers are written with a point instead of comma.

You can customize number elements using their options.

Functional Characteristics

This element accepts only number type of data. Thats why you can use its field values fo different calculations. Also, thanks to the various settings, you can set the format of the input data. That is, when the user enters some data, they will be displayed in the configured format, for example, monetary.

Value Format

Despite number is a string, it accepts any letters and signs except minus and dot.

{
    "field_value": "-3.00"
}

That is because of their conversion to a numeric data type.

Element Options

This gh-element has many options that allow you to customize the numbers to your liking. As most of others elements, number has two types of options.

Field Settings

Field settings contains the general number options. Most of them are unique. Only Field Name and Name space are standard.

Field settings of the number element

Name Description
Precision allows to choose how many signs will be after the point; details...
Multiple value allows to add multiple values; details...
Edit max min allows to change range of entry number; details...
Min minimum entry number; appears if Edit max min is on; details...
Max maximum entry number; appears if Edit max min is on; details...
Min digit count allows to set minimum number of signs in the entry field; details...
Prefix signs before number; details...
Suffix signs after number; details...

Precision

This is the option that allows you to configure the precision of numbers. Namely, you can set the number of digits after the point by selecting one of the available variants. The maximum number of digits is three.

Multiple value

This function allows you to customize a field to add multiple values.

Edit max min

This option allows to change default values of maximum and minimum values. When you turn it on it, Min and Max options appear.

Min and Max

Due to these fields you can set the limits of minimum and maximum number values.

Min digit count

Here you can set the minimum number of characters the user must enter in the number field. If the number is less than this minimum, a certain number of zeros are automatically added before the numbers.

Prefix and Suffix

Prefix and Suffix allows to add any signs before and after the value, respectively.

Default Value Settings

This group of options contains settings of the field default value.

Default value settings of the number element

Name Description
Use default value allows to use default value
Use counter allows to use counter as a default value; appears if Use default value is on
Default value allows to set default value; appears if Use default value is on

Element Style

The number elements do not have unique options for styles, so you can read about general ones in Setting Overview and below about Interpretation.

Style of the number element

Data Model

Number is quite understandable element. But it also has considerable quantity of settings. Its data model looks like this:

{
    "data_model": {        
        "default_counter": 1,
        "default_field_value": 1,
        "interpretation": [],
        "min_digits_count": -1,
        "multiple_value": 0,
        "precision": "0",
        "prefix": "",
        "range": {
            "min": 0, 
            "max": 100
            },
        "regular_expression": "\\d+(.d+)?$",
        "show_min_max": 1,
        "suffix": "",
        "use_counter": false,
        "use_default_value": 1
    }
}
Name Type Description
default_counter number contains a default value for counter
default_field_value number contains a default value for field
interpretation array contains all number interpretations
min_digits_count number minimum number of signs in the field
multiple_value boolean allows you to add multiple values to the field
precision string allows to set the number of characters after the point
prefix string contains signs that will be before number in the field
range object contains limits of number that can be in the field
min number contains the minimum value that can be in the field
max number contains maximum value that can be in the field
regular_expression string contains a regular expression that checks if the format of the value is correct
show_min_max boolean allows to edit min and max values
suffix string contains signs that will be after number
use_counter boolean allows to use counter values
use_default_value boolean allows to use default value

Filtration

For filtering number elements you can use such filters:

Interpretation

As elements of text, numbers have the same interpretation in different places.

Interpretation types of number

And also, it has a bit differences between multiple and single value interpretations.

Interpretation types of multiple values of number

Default

The default type is editable either for single value or multiple ones.

Plain Text

Plain text is an interpretation type that allows only displaying field values and makes field uneditable.

Value

Displays the value of the element field.