Support Forum
Support › Meta Box Group › Nested groups & Conditionat logic don't work properly
Hi,
I'm using nested groups and conditional logic and I have noticed that the first node of a subgroup leads the condition of all subitems. Example:
$meta_boxes[] = array(
'id' => 'layout-content',
'title' => 'Contenido',
'post_types' => array( 'page' ),
'include' => array(
'template' => array( 'template-modular.php' )
),
'fields' => array(
array(
'name' => 'Añade las filas que desees',
'id' => 'item-row',
'type' => 'group',
'clone' => true,
'sort_clone' => true,
'fields' => array(
array(
'name' => 'Videos explicativos',
'id' => 'video-explica-rows',
'type' => 'group',
'clone' => true,
'fields' => array(
array(
'name' => 'Tipo de inserción',
'id' => 'item-slide-video-type',
'required' => true,
'type' => 'select',
'options' => array(
'input_embed' => 'Insertar vídeo mediante código embed',
'input_file' => 'Insertar vídeo mediante archivos de vídeo optimizados para web',
),
),
array(
'name' => 'Embed',
'id' => 'item-slide-embed',
'type' => 'textarea',
'cols' => 1,
'rows' => 4,
'desc' => 'Hay que pegar el código embed',
'visible' => array( 'item-slide-video-type', 'in', array( 'input_embed' ) ),
),
array(
'name' => 'mp4',
'id' => 'item-slide-file-mp4',
'type' => 'file_advanced',
'visible' => array( 'item-slide-video-type', 'in', array( 'input_file' ) ),
'max_file_uploads' => 1,
),
array(
'name' => 'webm',
'id' => 'item-slide-file-webm',
'type' => 'file_advanced',
'visible' => array( 'item-slide-video-type', 'in', array( 'input_file' ) ),
'max_file_uploads' => 1,
),
array(
'name' => 'ogg',
'id' => 'item-slide-file-ogg',
'type' => 'file_advanced',
'visible' => array( 'item-slide-video-type', 'in', array( 'input_file' ) ),
'max_file_uploads' => 1,
),
),
),
),
),
),
);
When I select in the second row of subgroup the select "item-slide-video-type", the "input_file" option and in the first row of subgroup is selected "input_embed", nothing changes otherwise I change the first and all subgroups change.
If you are not understanding me please let me know!
Let me know if it's a known issue or something to be fixed.
Thanks!
PS: Good job with all plugins I love them!
Dear Buzzmn,
Thanks for installing our plugin, Meta Box Conditional Logic currently not fully supported Nested Group. I'm working with it but can't promise release date for it, perhaps late Jul.
Best regards
Tan