my form is valid first and working, but when I add choiceField to form and use select in template its not valid anymore. form.is_valid gives false
in form.py i added line:
crossover_select = forms.ChoiceField(label="crossover_select")
in template I added these:
<select name="crossover_select">
<option value={{crossover}}>old value {{crossover}}</option>
<option value={{peak}}>Peak {{peak}}</option>
<option value={{median}}>Median {{median}}</option>
<option value="Other">Other</option>
</select>
those crossover, peak and median are float.
now in views.py when I have:
if request.method=='POST':
form = myForm(request.POST)
print form.is_valid()
and that gives false
so my question is that where does this go wrong? without those changes everything works, but when I will do that drop down the form is not valid anymore