-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] isActive choice field not preselected #1087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you test with the current master. It should be fixed now. |
I tested it and it's fixed for select box and checkbox. But there is still no preselection for 'multiple' => false and 'expanded' => true, in other words, there is no preselection for radio input. Hopefully I updated to current master correctly. In my project root I used "git fetch" which updated something and then "php bin/vendors.php" which updated a lot of stuff, too. git fetch
|
Just tested on another entity, where the table column is a string with the length of 1. If I then use characters for choices, preselection works. So it seems, that it only doesn't work for "integer-choices". |
Ok, I'm pretty sure that if works for all cases now. Can you confirm? |
Yes I can confirm. Thank you very much! |
Can any one please help me to preselect a checkbox?. I just want two checkbox with label 'Yes' and another with 'No', the 'Yes' checkbox should be preselected. |
When creating an entity with a field 'active' of column type boolean (mysql -> tinyint(1) ) and try to use it in a form as a 'choice' field as radio with these attributes:
'required' => false, 'expanded' => true, 'multiple' => false, 'choices' => array( 0 => 'no', 1 => 'yes'),
the field is never preselected, no matter if value is 0 or 1.
I'd like to attach a test bundle I created for this problem that demonstrates it, but I don't know how.
[edit] Just discovered Gist, hope this helps: https://gist.github.com/990760
The text was updated successfully, but these errors were encountered: