Tagged: Data, groups, Persistence, radio
- This topic has 2 replies, 2 voices, and was last updated 7 years, 1 month ago by
lycidiae.
-
AuthorPosts
-
-
December 31, 2014 at 5:02 pm #3147
lycidiaeMemberHello!
Trying to use the Radio field in a repeating group has led to some finicky behavior:
Even though the radio is given a default value and is required, I have a problem of the a choice from the selection being lost in the GUI on the CPT backend page load. The three choices start out all blank even if a value for that repeater was selected during a different edit, the required field for some reason misses the dropped values, and updating deletes my meta values in the database.
Please help me out, am I missing some field in the Piklist setup array that persists choices, or is this a bug in the repeating groups (I’m not running into any persistence problems when radio and datepicker fields are top level).
piklist('field', array( 'type' => 'group', 'scope' => 'post_meta', 'field' => 'service_relation', 'label' => __('Relate Post'), 'description' => __('Link this accountant to his/her respective field(s) of practice.'), 'add_more' => true, 'columns' => 12, 'fields' => array( ... ,array( 'type' => 'radio', 'scope' => 'post_meta', 'field' => 'cpa_incharge', 'value' => 'member', 'required' => 'true', 'label' => 'Practice Area Level', 'columns' => 4, 'attributes' => array( 'class' => 'text' ), 'choices' => array( 'member' => 'Member', 'featured' => 'Featured', 'charge' => 'In Charge' ) ) ) ) ); -
December 31, 2014 at 8:40 pm #3149
-
January 2, 2015 at 1:39 pm #3151
lycidiaeMemberThanks for the warm welcome, I really appreciate your help!
Yes, there are a couple of other fields which aren’t having any issues.
Thanks for the tip, I’ll give it a shot and let you know!
-
-
AuthorPosts
- The topic ‘Grouped Radio Data Persistence’ is closed to new replies.