This documentation is under construction, as well as the tardigrades NoCode platform.
It will be released when it's done.

Choice field type

The choice field provides a set of items a selection can be made from.

Settings


Multiple: True or false

Allow selection of multiple choices.

Choices

Add choices. A text and a value. If you would render a list fo choices the option value would be value, and the text of the option would be text. Like so:

<select>
    <option value="elementary">Elementary</option>
    <option value="middleSchool">Middle School</option>
    <option value="highSchool">High School</option>
    <option value="university">University</option>
</select>

Example config


Configuration


Advanced

If you want to configure a Choice Field type manually, for your backend, this is an example:

/config/{application}/{section}/field/educationLevel.yml

field:
    name: Education level
    handle: educationLevel
    type: Choice
    form:
        all:
            label: Education level
            multiple: false
            required: true
            placeholder: choose_education_level
            choices:
                Elementary: elementary
                Middle School: middleSchool
                High School: highSchool
                University: university
    generator:
        entity:
            validator:
                NotBlank:
                    message: 'form_error_not_blank'