Answer the question
In order to leave comments, you need to log in
Why can't ifequal be processed in the template after the form is submitted?
View template:
<select name="period" >
{%for p in periods%}
<option value="{{p.id}}" {%ifequal p.id form.period.value%}selected{%endifequal%}>{{p.name}}</option>
{%endfor%}
</select>
<select name="period" >
{%for p in periods%}
<option value="{{p.id}}">'{{p.id}}'{%if p.id == form.period.value%}equals{%else%}not equal{%endif%}'{{form.period.value}}'</option>
{%endfor%}
</select>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question