Tagged: add_more, conditions, groups
- This topic has 1 reply, 2 voices, and was last updated 5 years, 10 months ago by
Steve.
Viewing 1 reply thread
-
AuthorPosts
-
-
April 12, 2016 at 9:26 am #6273
oakwoodMemberScenarios:
1. If I have a group (add_more), with a conditional inside – that works as expected.
2. If I have a group (add_more), with a conditional outside (controlling whether or not the group is shown) – that works as expected.
3. If I have a group (add_more), with a conditional outside (controlling whether or not the group is shown), and a conditional inside – that does not work as expected.Tested on 0.9.4.29 and 0.9.9.7 (different results on each version).
<?php /* Title: test Post Type: post Order: 1 Collapse: false */ piklist('field', array( 'type' => 'radio' ,'field' => 'show_hide_group_two' ,'label' => 'Radio' ,'choices' => array( 'show_group_two' => 'Show Group Two' ,'hide_group_two' => 'Hide Group Two' ) ,'value' => 'hide_group_two' )); piklist('field', array( 'type' => 'group' ,'field' => 'group_one' ,'label' => 'Group One - Always On' ,'add_more' => true ,'fields' => array( array( 'type' => 'select' ,'field' => 'show_hide_text_one' ,'label' => 'Show or hide text input' ,'columns' => 4 ,'choices' => array( 'show_text_one' => 'Show' ,'hide_text_one' => 'Hide' ) ,'value' => 'hide_text_one' ) ,array( 'type' => 'text' ,'conditions' => array( array( 'field' => 'group_one:show_hide_text_one' ,'value' => 'show_text_one' ) ) ,'field' => 'conditional_text_one' ,'label' => 'Conditional Text' ,'columns' => 8 ) ) )); piklist('field', array( 'type' => 'group' ,'field' => 'group_two' ,'label' => 'Group Two - Maybe On' ,'add_more' => true ,'conditions' => array( array( 'field' => 'show_hide_group_two' ,'value' => 'show_group_two' ) ) ,'fields' => array( array( 'type' => 'select' ,'field' => 'show_hide_text_two' ,'label' => 'Show or hide text input' ,'columns' => 4 ,'choices' => array( 'show_text_two' => 'Show' ,'hide_text_two' => 'Hide' ) ,'value' => 'hide_text_two' ) ,array( 'type' => 'text' ,'conditions' => array( array( 'field' => 'group_two:show_hide_text_two' ,'value' => 'show_text_two' ) ) ,'field' => 'conditional_text_two' ,'label' => 'Conditional Text' ,'columns' => 8 ) ) )); -
April 13, 2016 at 3:10 pm #6287
-
-
AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.