Location
To create an input of type- location, define the type value as location. The list of attributes passed to the input fields are as given below.
Attribute Name | Datatype | Description |
type* | String (Value should be location) | The type of the input field. Value of the field should be location. |
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. |
hint | String (100) | Provides a brief description of the fields purpose and the expected input. |
value | Object | Denotes the latitude and longitude of the selected location. Specifying lat and long coordinates in the value object will display the respective location as selected. "value": {"latitude": "13.08891","longitude": "80.26483"} |
mandatory | Boolean | Defines if the field's requisite is mandatory or not. Note: Default value is considered to be false. |
boundary | Object | Denotes the latitude and longitude of the location along with the radius. Radius denotes the specific limit within which a location can be selected. Note: The radius will always be in kilometres |
disabled | Boolean | If disabled is true, then the field will not be editable |
Sample Code:
Copied
JSON format passed in handlers for the filled-in value:
Copied