These are chat archives for symfony2admingenerator/GeneratorBundle

19th
Jun 2015
Bob van de Vijver
@bobvandevijver
Jun 19 2015 11:07
Okay, so I encounter the following problem with the new version of the admingenerator:
When using a boolean field, which is not nullable in the database, the field guesser decides that the field is required, as it is not nullable.
However, as it is rendered as checkbox, the field should not be required, as then the browser forces it to be checked before a submit can be done.
Am I missing a setting, or should I add a required: false to every checkbox in every generator yaml?
I guess the best solution (if I am not missing anything) is to add another case to the Guesser, which detects a boolean and a checkbox form type. It should then just return the array('required' => false)
Bob van de Vijver
@bobvandevijver
Jun 19 2015 11:30
I've made a PR (#164) to fix this, so please review :)
Stéphane
@sescandell
Jun 19 2015 15:17
looks good
thanks
Stéphane
@sescandell
Jun 19 2015 23:03
@peric merged, thanks
I also just pushed per-field feature