Tagged: conditions, Multi-select fields
- This topic has 3 replies, 2 voices, and was last updated 6 years ago by
Steve.
-
AuthorPosts
-
-
January 27, 2016 at 9:28 pm #5771
BenMemberI have a meta-box with three checkboxes: checkbox_1, checkbox_2, checkbox_3
checkbox_2 and checkbox_3 should only appear if checkbox_1’s value is “true”.
checkbox_3 is set to use the “field” template (‘template’ => ‘field’)The result is that checkbox_3 always appears in edit/new post view, regardless of checkbox_1’s value. This also happens for text fields.
The attachment shows what I am seeing before and after checkbox_1 is checked
/* Title: Condition Checkbox Test Description: Description for Condition Checkbox Test Post Type: post */ piklist('field', array( 'type' => 'checkbox', 'field' => 'checkbox_1', 'value' => 'false', 'choices' => array( 'true' => 'Show controls', ) )); piklist('field', array( 'type' => 'checkbox', 'field' => 'checkbox_2', 'choices' => array( 'true' => 'Foo' ), 'conditions' => array( array( 'field' => 'checkbox_1', 'value' => 'true' ), ), )); piklist('field', array( 'type' => 'checkbox', 'field' => 'checkbox_3', 'template'=> 'field', 'choices' => array( 'true' => 'Bar' ), 'conditions' => array( array( 'field' => 'checkbox_1', 'value' => 'true' ), ), ));Wordpress 4.4.1
PikList 0.9.4.29
twentyfifteen child templateAttachments:
You must be logged in to view attached files. -
January 27, 2016 at 11:40 pm #5782
SteveKeymasterTry the latest beta. I think that may help.
-
January 28, 2016 at 3:33 pm #5798
BenMemberProblem is still there.
I removed the existing piklist folder from the plugins directory, then unzipped the beta version. I then went to PikList – Settings and let it update the database. Piklist shows as version 0.9.9.7. All Piklist settings are enabled. The Demos are deactivated.
No errors in the browser or console. I have debugging enabled both to a log file and the screen. I don’t have any caching plugins enabled. I also tried incognito mode in chrome and a different browser (firefox) to make sure browser-caching wasn’t causing a problem.
-
February 1, 2016 at 11:57 am #5818
-
-
AuthorPosts
- You must be logged in to reply to this topic.