Input field types¶
There are four values for the type
keyword which have an input field:
string
- For text, email, date, file, and other inputs.number
- For number input (including floats).integer
- For integer only number input.boolean
- ForTrue
-False
inputs (checkbox by default).
We’ve excluded array
and object
types as they can’t have input fields.
Inputs for string
type¶
The input fields for string
values can be customized using the format
keyword.
Possible values for format
keyword are:
Format |
Description |
---|---|
|
A colour input |
|
A date input |
|
An email input |
|
A password input |
|
A range input |
|
A time input |
|
A file input. See File inputs for details. |
|
A file input. See File inputs for details. |
Examples:
# 1. Text input (default)
{
'type': 'string'
}
# 2. Date input
{
'type': 'string',
'format': 'date'
}
# 3. Email input
{
'type': 'string',
'format': 'email'
}
# ...
File inputs¶
There are two format
values for file uploads:
data-url
- for embedding base64 encoded data in the JSON object.file-url
- for keeping only the link to the file in JSON object.
Read Uploading files document for a full guide on uploading files.
Note
Do not use file
format for file inputs. This won’t work as you may expect.
Inputs for number
and integer
types¶
The number
and integer
types get an HTML number
input field.
They are not customizable.