Reputation: 46277
I have a modelchoicefield that has too many valid options to really show in a menu. How can I tell Django forms to use another widget that won't take up as much space rendering?
I want to use a HiddenField and I have another widget on the screen taht will populate it. If the hiddenfield has no value I keep getting form validation errors on it even though it is marked as required=false
Upvotes: 0
Views: 247
Reputation: 6394
All you need to do is use the widget
parameter of the form field definition...
But the question really is what other widget would you like to use?
There are some examples of autocomplete widgets. But nothing out of the box.
Upvotes: 2