-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix #289: if no options (data) are provided generate an empty optiong… #298
Conversation
Hi, there! |
The fix does not help, unfortunately: |
This has been fixed with this commit |
Hello, seems only partly fixed. Yii version: 2.0.30 My code:
I tried with set empty 'data' for the widget. Any suggestions? |
Same problem when options are loading by AJAX and field is required |
It seems the issue is as mentioned by @Axhind in this comment. This is due to an update to the yii2 form validation script which behaves in a totally different way now and skips select dropdowns with no options OR just one empty option. The solution workaround is that you need to have at least ONE EXTRA option in your SELECT dropdown beyond the empty value (which is set via placeholder). |
Hope this will be fixed as the issue is in yii.activeForm indeed: |
…roup.
Refer to https://w3c.github.io/html-reference/select.html
Scope
This pull request includes a
Changes
Related Issues
If this is related to an existing ticket, include a link to it as well.