Closed
Description
With the metabox below I have a problem saving the radio button. To repeat the issue:
- Create a new post
- Choose "template 1"
- Add Page (add Row)
- Choose "template 2"
- Publish
- The 2nd page doesn't even save. It's missing.
- Add Page (add Row)
- Choose "template 2"
- Update
- The 2nd page is still missing.
Note that if I have another field in there, say a text input, the 2nd page will save, but the radio button value doesn't get set.
Any thoughts on how I can fix this problem? I think it's the root to some other issues I'm having with adding rows/pages and then sorting...
$meta_boxes[] = array(
'id' => CMB_PREFIX.'lb_settings',
'title' => 'Settings',
CMB_POST_TYPE_KEY => array('lookbook'),
'context' => 'normal',
'priority' => 'high',
'show_names' => true,
'fields' => array(
array(
'id' => CMB_PREFIX.'lb_pages',
'type' => 'group',
//'description' => '',
'options' => array(
'group_title' => 'Page {#}',
'add_button' => 'Add Page',
'remove_button' => 'Remove Page',
'sortable' => true,
),
'fields' => array(
array(
'name' => 'Template',
'id' => CMB_PREFIX.'lb_page_template',
'type' => 'radio_inline',
'options' => array(
'template1' => 'Template 1',
'template2' => 'Template 2',
'template3' => 'Template 3',
)
),
)
),
)
);
Metadata
Assignees
Labels
No labels
Activity