- Checkbox
- ChoiceCheckboxes
- ChoiceRadios
- ChoiceSelect
- ChoiceSelectMultiple
- Date
- DateWithPicker
- EmailWithConfirmation
- File
- MultipleFile
- Number
- NumberForgivingInput
- Phone
- Text
- Textarea
- Time
A single checkbox field, that can be turned on and off again.
A list of values that can be chosen from using a checkbox layout. The end user is allowed to choose multiple values.
See Choice Select for information on passing values, labels and a placeholder to this field.
A list of values that can be chosen from using a radio button layout. The end user can only select one value.
See Choice Select for information on passing values, labels and a placeholder to this field.
A list of values that can be chosen from using a select box. The end user can only select one value.
Choices are passed via the "choices" content type. The content type contains a list of values and labels. These should be formatted as a json array. A simple choice value list would look like this:
[
"dossier",
"demand",
"document",
"information",
"complaint",
"other"
]
A multi level value list would look as follows (demonstrating 3 levels!):
[
{ "dossier": [
"dossier-a",
{ "dossier-b": ["dossier-b-1", "dossier-b-2"]},
{ "dossier-c": ["dossier-c-1", "dossier-c-2"]}
]},
{ "demand": [
"demand-a",
{ "demand-b": ["demand-b-1"]}
]},
"document",
"information",
{ "complaint": [
{ "complaint-a": ["complaint-a-1", "complaint-a-2"]},
{ "complaint-b": ["complaint-b-1", "complaint-b-2"]},
{ "complaint-c": ["complaint-c-1", "complaint-c-2"]}
]},
"other"
]
If you would pass a multi level choice when this is not supported, only the first level will be used. Only "Choice Select" supports multi level choices.
Passing a placeholder label "Choose an option" for your choice list is as simple as adding it to your label list as the first argument:
[
"Choose an option",
"Your file",
"Your demand",
"Your document",
"Your information",
"A plaint",
"Other"
]
If your choice contains duplicate values, they will be transformed to unique integer strings. Having duplicate values should therefore be catched and transformed in the submit twig template.
For example, the value list
[
"true",
"false",
"false"
]
Will be dynamically transformed to
[
"0",
"1",
"2"
]
A list of values that can be chosen from using a select box. The end user is allowed to choose multiple values.
See Choice Select for information on passing values, labels and a placeholder to this field.
A single text to enter a date with a defined format : dd/mm/yyyy and save as string.
A single text to enter a date with a defined format : dd/mm/yyyy and save as string. A custom class : 'date-with-picker' is available and can be used by your frontend to activate and style the datepicker plugin of your choice. The css and javascript for this datepicker are the responsability of the site that integrates the form, as there are too much options for the different frameworks out there.
Ensure that the end user's input is a valid email address.
Ensure that the end user's input is a valid email address. And provides a second field in which the end user needs to validate the given address. This field is designed to prevent pasting values in both the original and repeated email field.
Allow an end user to upload a file.
Allow an end user to upload multiple files.
This field only allows integers as input.
Instead of using a "Numbers" field, you can use this field to have a forgiving input format. Your users can make errors or separate the number how they want. The data being validated and send are the numbers in this text field.
A field that's used for phone input, as per html standard no validations happen by default on this field.
A simple field for text input (one line).
A simple field for large text input (multiple lines).
A field to define a time with a text input with format HH:mm.
A text field designed ton combine with CompanyNumber validation. The frontend will automatically activate validation when both this field and it's validation are combined.
A textarea field designed ton combine with CompanyNumberMultiple validation. The frontend will automatically activate validation when both this field and it's validation are combined.
This field is special, as it is not a real form field. The Markup
field allows you to introduce text between fields in your form.
The end user cannot change the value of this field, and the static data of this 'field' is not processed on submit.
A text field designed to combine with the NissInsz validation. The frontend will automatically activate validation when both this field and it's validation are combined.
A text field designed to combine with the NSSO validation. The frontend will automatically activate validation when both this field and it's validation are combined.
Make sure to add this field at the end of your form to allow the submission of your data to the server!
You might notice that we develop fields like "niss-insz" that only diverge from the Text field in the id they provide. ('niss-insz' in this case). We use this to have a link between our form field class in the HTML code and the class used by our Javascript to automatically instantiate javascript validation.