Home › Forums › Add-ons › Repeater Field › Unable to input anything in the WYSIWYG editor that is in repeater › Reply To: Unable to input anything in the WYSIWYG editor that is in repeater
Hi John,
I think I found the cause of the issue just don’t know what’s causing it (no error in the console unfortunately), so if an ACF field has a conditional that is checking if the WYSIWYG text editor field contains something/nothing the issue will occur.
Here’s my setup (should’ve provided these earlier sorry!):
WordPress 6.0.3
Advanced Custom Fields PRO 6.0.3
PHP 7.4.1
Here is the PHP code of the ACF setup:
acf_add_local_field_group(array(
'key' => 'group_6348ca70dcee0',
'title' => 'News Posts',
'fields' => array(
array(
'key' => 'field_634f750f155ad',
'label' => 'This field is the cause of the issue?',
'name' => 'using_a_conditional_to_hide_this_field_so_cilents_wont_tamper_with_it',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_6348de369a480',
'operator' => '==',
'value' => '',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'default_value' => '',
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
),
array(
'key' => 'field_6348de2a9a47f',
'label' => 'Contents',
'name' => 'contents',
'type' => 'repeater',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'layout' => 'block',
'pagination' => 0,
'min' => 0,
'max' => 0,
'collapsed' => '',
'button_label' => 'Add Content',
'rows_per_page' => 20,
'sub_fields' => array(
array(
'key' => 'field_6348de679a483',
'label' => 'Content Type',
'name' => 'content_type',
'type' => 'select',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'choices' => array(
'text' => 'Text',
'image' => 'Image',
'video' => 'Video',
),
'default_value' => false,
'return_format' => 'value',
'multiple' => 0,
'allow_null' => 0,
'ui' => 0,
'ajax' => 0,
'placeholder' => '',
'parent_repeater' => 'field_6348de2a9a47f',
),
array(
'key' => 'field_6348de369a480',
'label' => 'Text',
'name' => 'text',
'type' => 'wysiwyg',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_6348de679a483',
'operator' => '==',
'value' => 'text',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'default_value' => '',
'delay' => 0,
'tabs' => 'all',
'toolbar' => 'full',
'media_upload' => 0,
'parent_repeater' => 'field_6348de2a9a47f',
),
array(
'key' => 'field_6348de499a481',
'label' => 'Image',
'name' => 'image',
'type' => 'image',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_6348de679a483',
'operator' => '==',
'value' => 'image',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'return_format' => 'array',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
'preview_size' => 'medium',
'parent_repeater' => 'field_6348de2a9a47f',
),
array(
'key' => 'field_6348de569a482',
'label' => 'Video ID',
'name' => 'video_id',
'type' => 'text',
'instructions' => 'Input the YouTube (https://www.youtube.com/watch?v=YOUTUBE_ID) or Vimeo video ID (https://vimeo.com/VIMEO_ID)',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_6348de679a483',
'operator' => '==',
'value' => 'video',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'show_in_graphql' => 1,
'default_value' => '',
'placeholder' => '',
'parent_repeater' => 'field_6348de2a9a47f',
),
),
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'post',
),
),
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'stories',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => array(
0 => 'the_content',
1 => 'featured_image',
),
'active' => true,
'description' => '',
'show_in_rest' => 1,
));
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.