tammyhart / Reusable-Custom-WordPress-Meta-Boxes

177 stars 97 forks source link

Unable to uncheck all boxes in checkbox group after save/update #28

Open jerwre opened 11 years ago

jerwre commented 11 years ago

If you've checked boxes in a group and saved your post, you are unable to uncheck all boxes and update it. It won't update, and keeps at least 1 box still checked.

tammyhart commented 11 years ago

I cannot duplicate this bug in my testing, can you paste in your fields array?

jerwre commented 11 years ago

Using WP 3.5.1. As you can see, the fields array is the same as the one on the wiki page.

$prefix = "fvadm_banner_";
$cg = array(
    array(
        'label' => 'Checkbox Group',
        'desc'  => 'A description for the field.',
        'id'    => $prefix . 'checkbox_group',
        'type'  => 'checkbox_group',
        'options' => array (
            'one' => array (
                'label' => 'Option One',
                'value' => 'one'
            ),
            'two' => array (
                'label' => 'Option Two',
                'value' => 'two'
            ),
            'three' => array (
                'label' => 'Option Three',
                'value' => 'three'
            )
        )
    )
);