Skip to content

Unchecked checkbox show up as checked #179

@sjordan1975

Description

@sjordan1975

I have the following schema for checkbox:

{
type: "checkbox",
label: "Terms and Conditions",
model: "terms",
default: false
}

When I save the form, it posts the string "false" to the server.

So when the data is read from the server and the response is assigned to the model (ex. when editing an existing form), the component interprets "false" as truthy (strings are truthy) and makes the checkbox ticked.

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