I have looked around stack, cant seem to find the right search phrase to even get an answer, I assume its possible if not fairly easy just cant seem to find it.
Would like to have a way to skip when forloop.counter == specific numbers, I assume this is possible but haven't found anything like forloop.next
{% for instance in questions %}
<div>
{% for field, value in instance.fields.items %}
<div class="slidecontainer">
Counter: {{ forloop.counter }}
{% if forloop.counter == 1 %}
????
{% endif %}
<form name = "{{ field }}" id = "{{ field }}" >
{{ value }}<br>
<input class="slider" id="{{ field }}" input type="range" name="{{ field }}" min="0" max="10" value="5" step="1" onchange="showValue(this)" />
<span id="range">5</span>
</form>
</div>
{% endfor %}
</div>
{% endfor %}
Then also Similar question, I figure I could do it like this but is there a better way to write it:
{% if forloop.counter == 1 or foorloop.counter == 4 or foorloop.counter == 12 or foorloop.counter == 20 %} # and more, shortened
# show nothing - the parts of loop I am wanting to skip
{% else %}
# show what I want for the other iterations of loop
{% endif %}
Then one more question I have similar, is there a way to determine the field type? Honestly havent looked this one much but since I was asking the questions, figured I could ask here.
Would be great if anyone knew of a good site for information on what is possible with, {{..}}
and {%..%}
stuff (is this Jinja? hard to look up when you dont know exactly what it is)
Thanks!