No matter if you use presets or create your own layouts, form fields are an essential part of the configuration and have very powerful options.
You can choose the names for your fields freely, but there are two limitations:
- You can only use alphanumeric characters and underscores in field names.
- Do not use names that are reserved by native page methods. For example, if you give your field the name "image", it will conflict with Kirby's
A list of checkbox fields
A date picker field
An email input field with validation
A files select field that allows to select one or multiple related files
Creates a headline to group fields
Creates a hidden field
A plain HTML field for user instructions
Draws a horizontal line to separate fields
A select field that allows you to select multiple options
A number input field with validation
A pages select field that allows to select one or multiple related pages
A list of radio buttons
A handy slider
A simple selectbox field
Structured data input, which stores data in a field as YAML.
An interactive tags input field with autocompletion
A phone number input field
A standard, single-line input field
A textarea field, which auto-resizes and has built-in format buttons.
A time picker field
Yes/no or on/off toggle
A URL input field with validation
A user select field that allows to select one or multiple users
You can extend this list with your own field types by creating a field plugin.
In all fields, you can set a condition for displaying the field via the
when option. In the
when option you define a field name as the key and the required value of that field. In the following example, the text field is only shown when the toggle is set to
fields: toggle: type: toggle text: type: text when: toggle: true
If multiple conditions should be fulfilled to show a field, you can add more of them to the
when option. All of these conditions need to be fulfilled to display the field:
fields: toggle: type: toggle category: type: select options: - A - B - C text: type: text when: toggle: true category: B