Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unchecked checkboxes get checked again at next page load #6

Closed
lmeurs opened this issue Nov 7, 2011 · 1 comment
Closed

Unchecked checkboxes get checked again at next page load #6

lmeurs opened this issue Nov 7, 2011 · 1 comment

Comments

@lmeurs
Copy link

lmeurs commented Nov 7, 2011

In version 3.2.2 at line 226 the function show() checks if a custom field has any value: if not, it declares the default value. See:
$meta = ($meta !== ”) ? $meta : $field['std'];

But when a checkbox is unchecked, no data is saved and the next time the field gets loaded, it gets the standard value. If the default value is 1, true, ‘on’ or ‘checked’ an unchecked checkbox always automatically gets checked again!

A solution might be to always save a value, also when a checkbox is unchecked. Like FALSE, 0 or ‘off’…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants