We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
It would be nice to support optgroup with SelectField and SelectMultipleField. Here is an implementation suggestion:
SelectField
SelectMultipleField
>>> import wtforms >>> class F(wtforms.Form): ... foo = SelectField(choices={ ... "hello": [ ... ("a", "foo"), ... ("b", "bar"), ... ], ... "world": [ ... ("c", "foobaz"), ... ("d", "barbaz"), ... ], ... }) ... >>> F().foo() <select id="foo" name="foo"> <optgroup label="hello"> <select value="a">foo</select> <select value="b">bar</select> </optgroup> <optgroup label="world"> <select value="c">foobaz</select> <select value="d">barbaz</select> </optgroup> </select>
The text was updated successfully, but these errors were encountered:
I suppose it is not possible to have a mixed SelectField, I mean some items with and other without an optgroup?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It would be nice to support optgroup with
SelectField
andSelectMultipleField
. Here is an implementation suggestion:The text was updated successfully, but these errors were encountered: