heartcombo / simple_form

Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.
http://blog.plataformatec.com.br/tag/simple_form
MIT License
8.21k stars 1.31k forks source link

<div class="checkbox"> <input value="false" type="hidden" name="meal[completed]"> <input class="boolean optional" type="checkbox" value="true" checked="checked" name="meal[completed]" id="meal_completed"> <label class="boolean optional" for="meal_completed">Completed</label> </div>Update: This bug only appears if you have custom value for `unchecked_value`. In this case `unchecked_value: false` #1835

Closed Osamaajram77 closed 6 months ago

Osamaajram77 commented 6 months ago
          Update: This bug only appears if you have custom value for `unchecked_value`. In this case `unchecked_value: false`

Example = f.input :completed, as: :boolean, checked_value: true, unchecked_value: false

_Originally posted by @ryanfelton in https://github.com/heartcombo/simple_form/issues/1320#issuecomment-156133817_

carlosantoniodasilva commented 6 months ago

This should no longer be a bug, that related PR has been closed as fixed.

If you do think this is still a bug, please provide a sample that shows the problem, and a more descriptive title/description. Thanks!