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

Page field checkbox value not saved #1225

Closed
onionradish opened this issue Dec 23, 2016 · 1 comment
Closed

Page field checkbox value not saved #1225

onionradish opened this issue Dec 23, 2016 · 1 comment
Assignees

Comments

@onionradish
Copy link

onionradish commented Dec 23, 2016

Adding a checkbox field foo to a page blueprint does not correctly save/update the value. It's always '0' or false.

form:
    fields:
        header.foo:
            type: checkbox
            label: foo
            name: foo
            title: foo
            validate:
                type: bool

Results in the header value always equal to false, regardless of whether checked/saved or unchecked/saved. Same field with type: toggle works correctly.

@onionradish onionradish changed the title Page field checkbox is not saved in header Page field checkbox value not saved in header Dec 23, 2016
@onionradish onionradish changed the title Page field checkbox value not saved in header Page field checkbox value not saved Dec 23, 2016
@onionradish
Copy link
Author

It's possible that part of the issue is in typeCheckbox() in Grav\Common\Data\Validation.php - the test there is unlike others.

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

No branches or pull requests

3 participants