Fixed bug with HTML labels

loop.counter is incorrect - loop.index outputs the correct loop value.
This commit is contained in:
Simon Willison 2017-12-09 13:57:36 -08:00
commit 3f2fed1093
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52

View file

@ -33,7 +33,7 @@
{% if named_parameter_values %}
<h3>Query parameters</h3>
{% for name, value in named_parameter_values.items() %}
<p><label for="qp{{ loop.counter }}">{{ name }}</label> <input type="text" id="qp{{ loop.counter }}" name="{{ name }}" value="{{ value }}"></p>
<p><label for="qp{{ loop.index }}">{{ name }}</label> <input type="text" id="qp{{ loop.index }}" name="{{ name }}" value="{{ value }}"></p>
{% endfor %}
{% endif %}
<p><input type="submit" value="Run SQL"></p>