Field reference

Multi select field

A token-based control for choosing more than one value.

#Field definition

Add this array inside a block, field group, or option page fields list.

PHP
['field_key' => 'audiences', 'label' => 'Audiences', 'type' => 'multi_select', 'options' => [['value' => 'agency', 'label' => 'Agency'], ['value' => 'startup', 'label' => 'Startup']]]

#Saved value

PropertyValue
Field typemulti_select
PHP / REST valuestring[]
Empty value[]

#Rendering example

Read block fields from $attributes. Post fields use voxycure_get_field(); option fields use voxycure_get_option().

PHP
$value = $attributes['audiences'] ?? '';
echo esc_html(is_array($value) ? implode(', ', $value) : (string) $value);

#Common field options

KeyTypePurpose
field_keystringRequired unique storage key using lowercase letters, numbers, underscores, or hyphens.
labelstringHuman-readable editor label.
default_valuemixedValue used before content is saved. Match the field value type.
requiredbooleanRejects an empty option-page submission.
conditional_logicarrayControls editor visibility based on another field.
locationstringdefault or inspector for block fields.
Framework version2.0.0
PHP requirement8.0+
Documentation updatedAugust 2026