Difference between revisions of "Implementing Select field with Flask"

From PeformIQ Upgrade
Jump to navigation Jump to search
(Created page with " See: * http://stackoverflow.com/questions/24392501/how-to-use-selectfield-for-flask-and-retreive-multiple-values Category:Flask")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:


* http://stackoverflow.com/questions/24392501/how-to-use-selectfield-for-flask-and-retreive-multiple-values
* http://stackoverflow.com/questions/24392501/how-to-use-selectfield-for-flask-and-retreive-multiple-values
<pre>
<select name="State" class="inputSelect">
{% for state in ctx.State_options %}
<option value="{{state}}" {{'selected' if ctx.State == state else ''}}>{{state}}</option>
{% endfor %}
</select>
</pre>




[[Category:Flask]]
[[Category:Flask]]

Latest revision as of 12:48, 26 June 2017

See:

<select name="State" class="inputSelect">
{% for state in ctx.State_options %}
 <option value="{{state}}" {{'selected' if ctx.State == state else ''}}>{{state}}</option>
{% endfor %}
</select>