Field Render

Display an ACF Field Types selector as radio, checkbox or select field type.

Field Group

Field Settings

Setting nameDescription
Allow FormsFilter which field types can be chosen
AppearanceSelect the appearance of this field
Default ValueEnter each default value on a new line
Return ValueReturn the field type object or field type name
Allow NullAllow empty value
LayoutChoose the layout
ToggleAllow to toggle all values
Allow Custom
Allow custom value
Save Custom
Save custom value in the field settings
Select multiple valuesAllow multiple values selection
Stylised UIEnable Select2 UI style

Field Value

Return Format: Field Type Name

$field_types = get_field('field_types');

// textarea

Return Format: Field Type Object

$field_types = get_field('field_types');

/**
 * array(
 *     'name'          => 'textarea',
 *     'label'         => 'Text Area',
 *     'category'      => 'basic',
 *     'defaults'      => array(
 *         'default_value' => '',
 *         'new_lines'     => '',
 *         'maxlength'     => '',
 *         'placeholder'   => '',
 *         'rows'          => '',
 *     ),
 *     'l10n'         => array(),
 *     'public'       => true,
 *     'show_in_rest' => true,
 * )
 */

Unformatted Value

$field_types = get_field('field_types', false, false);

// textarea