Skip to content

'empty_data = true' to set default value of checkbox gives error.  #14579

@apfz

Description

@apfz

I wanted to set the default value of a checkbox to checked in the following way:

$form->add('public', 'checkbox', array (
'label' => 'Registration is public',
'required' => false,
'empty_data'=>true
));

but when i uncheck the box, it gives me an error: "This value is not valid."

Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions