team-formalist / formalist-rb

Flexible form builder
MIT License
22 stars 4 forks source link

Default check box values to false #37

Closed timriley closed 8 years ago

timriley commented 8 years ago

The formalist UI JS libraries are strict about how they interpret input values. If we pass nil for the check box values, that becomes null there, which does not equate to an actual false/unchecked state for the checkboxes. This means that they need to be checked and then unchecked again in order to submit an actual value.

This change should fix this, by setting a proper true/false value on checkboxes for any input type (which means a nil input will default to false).