Skip to content

Field example: Select

Daniel Bishop edited this page Apr 6, 2015 · 4 revisions

Here's how you can use a select field with pre-populated options within the registration of your Shortcode UI.

array(
    'label' => 'Field Label',
    'attr' => 'yourshortcodeattribute',
    'type' => 'select',
    'options' => array(
        'value1' => 'Label 1',
        'value2' => 'Label 2',
        'value3' => 'Label 3',
    ),
),
Clone this wiki locally