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
Built-in Fields
- Button - Button field for form navigation and submission
- Text - Single-line text input field
- Multi-line Text - Multi-line text input field for longer content
- Number - Number input field for numeric values
- Email - Email input field with validation
- Checkboxes - Multiple choice selection field
- Radio - Single choice selection field
- Select - Dropdown selection field
- Pages - Dropdown populated with Kirby pages
- Hidden - Hidden field for URL parameters and data storage
- File Upload - File upload field for documents and media
Fields created by the Community
- Date Field using Air DatePicker by Tobias Möritz
- Date Field by Till Schander
- Info Field by Moinframe
Creating Custom Fields
- Custom Fields - Learn how to create your own custom fields
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
| Option | Default | Accepts | Description |
|---|---|---|---|
| tobimori.dreamform.fields.available | true |
`boolean | array` |