Tagged: addmore, conditional, group
- This topic has 2 replies, 2 voices, and was last updated 1 year, 12 months ago by
thor.
Viewing 2 reply threads
-
AuthorPosts
-
-
February 4, 2020 at 8:49 am #9556
thorMemberI have added ‘reset’ => ‘false’ to the fields, but when hiding and showing the fields (via ‘product_show_faq’) it still clears the very first field ‘product_faq_title’ – not any of the other fields – not even a second (repeated) ‘product_faq_title’. A bug?
<?php /* Title: FAQ Post Type: product Priority: high Order: -1 */ piklist('field', array( 'type' => 'radio', 'field' => 'product_show_faq', 'label' => 'Show FAQ?', 'attributes' => array( 'class' => 'text', ), 'choices' => array( 'yes' => 'Yes', 'no' => 'No' ), 'value' => 'no' )); piklist('field', array( 'type' => 'group', 'field' => 'product_faq', 'label' => 'FAQ', 'list' => false, 'reset' => 'false', 'conditions' => array( array( 'field' => 'product_show_faq', 'value' => 'yes' ) ), 'add_more' => true, 'fields' => array( array( 'type' => 'text', 'reset' => 'false', 'field' => 'product_faq_title', 'required' => false, 'columns' => 12, 'attributes' => array( 'placeholder' => 'Type question' ), ), array( 'type' => 'editor', 'reset' => 'false', 'field' => 'product_faq_content', // 'post_content' is the field name of the WordPress DEFAULT editor 'value' => '', //'template' => 'field', // Only display the field not the label 'options' => array( // Pass any option that is accepted by wp_editor() 'wpautop' => true, 'media_buttons' => false, 'shortcode_buttons' => false, 'teeny' => true, 'dfw' => false, 'quicktags' => true, 'drag_drop_upload' => false, 'tinymce' => array( 'resize' => false, 'wp_autoresize_on' => true, 'toolbar1' => 'bold,italic,underline,link,unlink', 'toolbar2' => '', ) ) ) ) )); -
February 10, 2020 at 4:07 pm #9557
SteveKeymasteryup… looks like you found a bug. The Piklist 2.0 rewrite will correct that.
-
February 11, 2020 at 3:26 am #9558
thorMemberOk – looking forward to piklist 2.0 🙂
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.