Hi! How can I correctly setup a single checkbox meta? Cannot find this kind of info…
So, I’ve tried your example:
<?php $mb->the_field(‘cb_single’); ?>
<input type=”checkbox” name=”<?php $mb->the_name(); ?>” value=”abc”<?php $mb->the_checkbox_state(‘abc’); ?>/> abc<br/>
It doesn’t get saved.
In MetaBox class, _save() method, lines 2216-2235, this code:
the first time shows me the checkbox data, the second time, after filtering it (apply_filters(‘save’)..), it becomes NULL.
So, am I doing something wrong? How can I fix it and get my single checkbox saved?
ok. found the problem. I applied a filter that didn’t correctly return $meta.
fine. solved. Thank you anyway.
You must be logged in to reply to this topic.