Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.
This repository was archived by the owner on May 30, 2023. It is now read-only.

F.FormComponent should support default values for checkboxes #1

Description

@lazd

Steps

  1. Use F.FormComponent and a form that includes a checkbox.
var Component = new Class({
  extend: F.FormComponent,
  model: Backbone.Model.extend({}),
  template: Handlebars.compile('<input type="checkbox" name="someAttr" value="cowValue"><button>Submit</button>')
});
  1. Load a model that has someAttr: cowValue.
  2. Load the form, uncheck the checkbox, hit save.

Result

someAttr remains as cowValue.

Expected

someAttr should be unset? Set to a different value?

Analysis

When the checkbox is checked, the attribute someAttr is correctly updated with the property: value, when the checkbox is not checked, the property someAttr is untouched

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions