Display an ACF Fields selector as radio, checkbox or select field type.
Setting name | Description |
Allow Forms | Filter which fields can be chosen |
Appearance | Select the appearance of this field |
Default Value | Enter each default value on a new line |
Return Value | Return the field object, field key, field name or field ID |
Allow Null | Allow empty value |
Layout | Choose the layout |
Toggle | Allow to toggle all values |
Allow Custom | Allow custom value |
Save Custom | Save custom value in the field settings |
Select multiple values | Allow multiple values selection |
Stylised UI | Enable Select2 UI style |
$fields = get_field('fields');
// my_textarea
$fields = get_field('fields');
// field_639f1b9f0e96f
$fields = get_field('fields');
// 275
$fields = get_field('fields');
/**
* array(
* 'ID' => 275,
* 'key' => 'field_639f1b9f0e96f',
* 'label' => 'My Textarea',
* 'name' => 'my_textarea',
* 'aria-label' => '',
* 'prefix' => 'acf',
* 'type' => 'text',
* 'value' => null,
* 'menu_order' => 0,
* 'instructions' => '',
* 'required' => 0,
* 'id' => '',
* 'class' => '',
* 'conditional_logic' => 0,
* 'parent' => 'group_639f1b9d2799b',
* 'wrapper' => array(
* 'width' => '',
* 'class' => '',
* 'id' => '',
* ),
* 'default_value' => '',
* 'maxlength' => '',
* 'placeholder' => '',
* 'prepend' => '',
* 'append' => '',
* )
*/
$fields = get_field('fields', false, false);
// field_639f1b9f0e96f