- This topic has 1 reply, 2 voices, and was last updated 7 months ago by .
-
Topic
-
I have a page builder style metabox area and for some reason the visibility doesn’t toggle for the group items.
I’m trying to show / hide the single_image field depending on a selection from the select_advanced metabox, But this condition doesn’t perform any checks:
'visible' => ["{$builder_prefix}style", 'image_top_text_below'],
/** * Layout: Columns */ array( 'name' => 'Column Style', 'id' => "{$builder_prefix}style", 'type' => 'select_advanced', 'options' => array( 'image_top_text_below' => 'Image top, text below', 'text_with_background' => 'Text with background', ), 'multiple' => false, 'placeholder' => 'Choose your layout', ), array( 'name' => 'Column Count', 'id' => "{$prefix}column_count", 'type' => 'radio', 'inline' => 'true', 'options' => array( '2' => '2', '3' => '3', ), ), // Columns Group array( 'id' => "{$column_prefix}group", 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'save_state' => true, 'default_state' => 'expanded', 'group_title' => array('field' => "{$column_prefix}title" ), 'add_button' => '+ Column', 'fields' => array( array( 'name' => 'Column Image', 'id' => "{$column_prefix}image", 'type' => 'single_image', 'visible' => ["{$builder_prefix}style", 'image_top_text_below'], ), array( 'name' => 'Column Title', 'id' => "{$column_prefix}title", 'type' => 'text', ), array( 'name' => 'Column Text', 'id' => "{$column_prefix}text", 'type' => 'wysiwyg', 'raw' => false, 'options' => array( 'textarea_rows' => 3, 'teeny' => true, 'media_buttons' => false, ), ), ), ), // end Group
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.