I've created a SelectField like so:
class Inputs(Form):
myChoices = #number of choices
myField = SelectField(u'Field name', choices = myChoices, validators = [Required()])
The problem is that when it renders in my template:
<form action="" method="post" name="Inputs">
{{form.hidden_tag()}}
<p>
{{form.myField(size=80)}}
</p>
</form>
It looks like a long select box with all the values already shown, rather than a drop-down menu. How do I change this formatting? Thanks!
The problem was the (size=80)
in my html - I deleted this and it works fine. I thought this was a way to limit the size of the dropdown similar to TextField form field, but obviously not!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With