What are fields?
Fields are the core building blocks of your form. They define what data, how it can be submitted, as well as validate & sanitize it.
A field doesn't have to be a form input, it can also be a button or an image, although they will always follow the same syntax as a normal field.
Available Fields
Button
Submit form responses or go to the next step
Text
The core text field for accepting any answer
Multi-line Text
Accept long text answers
Capture & validate Email addresses
Number
Accept numbers or decimals as answer
Checkboxes
Select multiple entries from a collection of choices
Radio Buttons
Select one entry from a number of choices
Dropdown
Classic multiple choice dropdown with predefined options
Pages Dropdown
Autopopulate a dropdown field with pages from your Kirby site
Hidden (Values from URL)
Collect values from URL parameters or custom code
File Upload
Accept file uploads of any type
Fields created by the Community
Configuring Fields
By default, all registered and configured fields are available, but you can customize the available fields in your config.php
.
// site/config/config.php
return [
'tobimori.dreamform' => [
'fields' => [
'available' => ['text', 'textarea', 'select', 'checkboxes', /* other guards here */ ],
],
],
];
Options
tobimori.dreamform.fields. | Default | Accepts | Description |
---|---|---|---|
tobimori.dreamform.fields. available |
Default
true |
Accepts
boolean|array |
Available fields, true enables all fields |