I am overwriting an inline template - in my template I used:
{% for line in fieldset %}
{% for field in line %}
<td class="original {{ field.field.name }}">
<div name="foobar_a">
{% ifequal field.field.name "rule_type" %}
{% ifequal field.field "2" %}
fine
{% endifequal %}
{% endifequal %}
</div>
{{ field.field }} {% endfor %} {% endfor %} {% endfor %}
</tr>
{% endfor %}
But this doesn't work because the field.field
gives a HTML tag and the value of the field, i.e:
<input id="id_waprule_set-0-rule_type" type="hidden" value="2" name="waprule_set-0-rule_type"/>
2
Because of this my ifequal
is not working.
Is there any way that I can get the only value i.e '2' without using JavaScript?