English (United Kingdom)

Displays a standard dropdown.

type

(string)  Must be equals to select.

label

(string)  The label to display next to the field.

help

(string)  An optional text to describe the purpose of the field.

required

(bool)  Whether the field is mandatory or optional.

default

(string|array)  The default pre-selected option(s).

value

(string|array)  The last selected option(s).

multiple

(bool)  Whether it is possible to select more than a value (false by default).

id

(string)  An optional field ID.

class

(string)  An optional field class suffix.

hidden

(bool)  True to avoid displaying the label of the field.

options

(array)  An array containing the select options, where the array key represents the option value and the array value is used as option text.

[
    'reachus' => [
        'type' => 'select',
        'label' => 'How did you find us?',
        'value' => 'Google',
        'options' => [
            'youtube' => 'YouTube',
            'google' => 'Google',
            'facebook' => 'Facebook',
            'adv' => 'Advertisement',
            'other' => 'Other',
        ],
    ]
]

Changelog

Version Description
1.2.5 Introduced.
Last Update: 2022-03-09
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information