Skip to product menu
Skip to main content

Number

To create an input of a number type, define the type value as a number. The list of attributes passed to the input fields is given below.

Attribute NameDatatype Description
type*String 
(Value should be number)
The type of the input field. Value of the field should be number.
placeholder*String (150)Sample field value displayed to the user that describes the expected value of the input field.
name*String (50)A unique identifier for the field. Upon form submission, value defined for this key will be available in the function associated with the form.
label*String (150)Describes the display name for this field.
hintString (100)Provides a brief description of the fields purpose and the expected input.
maxIntegerSpecifies the maximum number value.
minInteger

Specifies the minimum number value.

valueString(2048)

Provide a default input value for the field.  

Note: Only valid numbers are allowed for this field.

mandatoryBooleanDefines if the field's requisite is mandatory or not. 
Note: Default value is considered to be false.
disabledBooleanIf disabled is true, then the field will not be editable

Sample Code:

Copied{
   "type":"number",
   "name":"number",
   "label":"Participants",
   "placeholder":"30",
   "hint":"Total number of participants",
   "mandatory":true,
   "max":200,
   "min":20,
   "value":"20",
   "disabled" : false
}

JSON format passed in handlers for the filled-in value:

Copied{
   "meta":{
      "type":"number",
      "value":"20"
   },
   "value":"20"
}