File
The file upload field in forms allows you to attach upto a maximum of 10 files. Take a look at the list of attributes passed for this input field type is given below.
Note:
- A form can have a maximum of 3 file input fields.
- The maximum size of a file that can be uploaded is 50 MB
Attribute Name | Datatype | Description |
type* | String (Value should be file) | The type of the input field. Value should be file |
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. |
multiple | Boolean | Define if your field should be a single select or multi select field. For all multi select fields, multiple should be set as true. |
max_selections | Integer Maximum selections allowed: 10 | Defines the number of options that a user can choose from the drop-down. Note: Value for this field defaults to 1 in case of single select drop-downs. |
mandatory | Boolean | Defines if the field's requisite is mandatory or not. Note: Default value is considered to be false. |
disabled | Boolean | If disabled is true, then the field will not be editable |
Sample Code:
Copied{
"type":"file",
"name":"file",
"label":"Upload File",
"placeholder":"demo-file.png",
"hint":"Upload your file",
"mandatory":true,
"multiple":true,
"max_selections":3,
"disabled" : true
}
JSON format passed in handlers for the filled-in value:
Copied{
"files":[
$delugeFileObject
]
}