-
Notifications
You must be signed in to change notification settings - Fork 124
Select Field
ajitbohra edited this page Dec 1, 2014
·
15 revisions
A select field. Options can be set manually by passing an array of option value => option name.
Uses Select2, a jQuery based replacement for select boxes.
- id (string) (required)
- name (string) (required) Field display name. Used as field label.
- type 'select' (required)
- options (array) (required) - option_value => Option Name
- allow_none (bool) (optional) Enable option for 'none'.
- multiple (bool) (optional) Enable multi select.
array(
'id' => 'example-field-select',
'name' => 'Select Field',
'type' => 'select',
'options' => array(
'option-1' => 'Option 1',
'option-2' => 'Option 2',
'option-3' => 'Option 3',
)
),
- Setup/Install Custom Meta Boxes
- Creating a custom meta box
- Displaying Field Data
- Optional Generic Field Args
- Repeatable Fields
General
- Text Field
- Small Text Field
- Number Field
- URL Field
- Textarea Field
- Code Field
- Select Field
- Checkbox Input Field
- Radio Input Field
Date & Time
WordPress
Media
Utilities