Advanced Custom Fields PHP field types

Reload page to update random field/group keys.

Random field and group keys


Date

	
[
	'key' => 'field_69f78e9712645',
	'label' => _x('Datum der Besichtigung', 'ACF field label', 'sha'),
	'name' => 'observation_date',
	'type' => 'date_picker',
	'required' => 1,
	'display_format' => 'd/m/Y',
	'return_format' => 'Y-m-d',
	'first_day' => 1,
],	

Group

acf_add_local_field_group([
	'key' => 'group_69f78e9712649',
	'title' => 'Regionen',
	'fields' => [
	],
	'location'   => [
		[
			[
				'param'    => 'options_page',
				'operator' => '==',
				'value'    => 'sht-settings',
			],
		],
	],
	'menu_order' => 5,
	'position' => 'normal',
	'style' => 'default',
	'label_placement' => 'top',
	'instruction_placement' => 'label',
	'hide_on_screen' => '',
	'active' => true,
	'description' => '',
]);

Radio-Buttons

[
	'key' => 'field_69f78e971264a',
	'label' => __('Radio-Optionen', 'sha'),
	'name' => 'sht_radio',
	'type' => 'radio',
	'instructions' => '',
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'choices' => [
		1 => 'Eins',
		2 => 'Zwei',
	],
	'allow_null' => 0,
	'other_choice' => 0,
	'default_value' => '',
	'layout' => 'horizontal',
	'return_format' => 'value',
],

Select

[
	'key' => 'field_69f78e971264b',
	'label' => _x('Bildgrösse', 'ACF field label', 'sha'),
	'name' => 'image_size',
	'type' => 'select',
	'instructions' => '',
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'choices' => [
		'small' => 'Klein',
		'regular' => 'Standard',
	],
	'default_value' => 'regular',
	'allow_null' => 0,
	'multiple' => 0,
	'ui' => 0,
	'return_format' => 'value',
	'ajax' => 0,
	'placeholder' => '',
],

Tab

[
	'key' => 'field_69f78e971264c',
	'label' => _x('Tab Text', 'ACF field label', 'sha'),
	'name' => '',
	'type' => 'tab',
	'instructions' => '',
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'placement' => 'left',
	'endpoint' => 0,
],

Text

[
	'key' => 'field_69f78e971264d',
	'label' => _x('Text field', 'ACF field label', 'sha'),
	'name' => 'sht_text_field',
	'type' => 'text',
	'instructions' => _x('Instructions', 'ACF field label', 'sha'),
	'required' => 1,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'default_value' => '',
],

Taxonomy selector

[
	'key' => 'field_69f78e971264e',
	'label' => _x('Taxonomie Mitarbeitergeschichte', 'ACF field label', 'sha'),
	'name' => 'sht_teammemberstory_tax',
	'type' => 'taxonomy',
	'instructions' => '',
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'taxonomy' => 'sht_story_type',
	'field_type' => 'radio',
	'allow_null' => 0,
	'add_term' => 0,
	'save_terms' => 0,
	'load_terms' => 0,
	'return_format' => 'id',
	'multiple' => 0,
],

Textarea

[
	'key' => 'field_69f78e971264f',
	'label' => _x('Textarea', 'ACF field label', 'sha'),
	'name' => 'sht_textarea',
	'type' => 'textarea',
	'instructions' => _x('Instructions', 'ACF field label', 'sha'),
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'default_value' => '',
	'placeholder' => '',
	'maxlength' => '',
	'rows' => '',
	'new_lines' => '',
],

true/false

[
	'key' => 'field_69f78e9712650',
	'label' => _x('Ja oder nein', 'ACF field label', 'sha'),
	'name' => 'sht_yes_or_no',
	'type' => 'true_false',
	'instructions' => _x('', 'ACF field label', 'sha'),
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'message' => '',
	'default_value' => 1,
	'ui' => 1,
	'ui_on_text' => _x('Ja', 'ACF field label', 'sha'),
	'ui_off_text' => _x('Nein', 'ACF field label', 'sha'),
],

URL

[
	'key' => 'field_69f78e971266b',
	'label' => _x('Website', 'ACF field label', 'sha'),
	'name' => 'sht_website',
	'type' => 'url',
	'instructions' => _x('Instructions', 'ACF field label', 'sha'),
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'default_value' => '',
	'placeholder' => '',
],

WYSIWYG

[
	'key' => 'field_69f78e971266c',
	'label' => _x('Text', 'ACF field label', 'sha'),
	'name' => 'sht_wysiwyg',
	'type' => 'wysiwyg',
	'instructions' => '',
	'required' => 0,
	'conditional_logic' => 0,
	'wrapper' => [
		'width' => '',
		'class' => '',
		'id' => '',
	],
	'default_value' => '',
	'tabs' => 'all',
	'toolbar' => 'full',
	'media_upload' => 1,
	'delay' => 0,
],