Update form to send data as expected by the route
This commit is contained in:
parent
9ff21bb58b
commit
2121e28bd3
@ -27,17 +27,17 @@
|
|||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for f in field.choices %}
|
{% for choice in field.choices %}
|
||||||
<li>
|
<li>
|
||||||
{% if f[0] != 'other' %}
|
{% if choice[0] != 'other' %}
|
||||||
<input type='checkbox' name='options' id='{{ field.name }}-{{ field.choices.index(f) }}'/>
|
<input type='checkbox' name='{{ field.name }}' id='{{ field.name }}-{{ field.choices.index(choice) }}' value='{{ choice[0] }}'/>
|
||||||
<label for='{{ field.name }}-{{ field.choices.index(f) }}'>{{ f[1] }}</label>
|
<label for='{{ field.name }}-{{ field.choices.index(choice) }}'>{{ choice[1] }}</label>
|
||||||
{% else %}
|
{% else %}
|
||||||
<input @click="otherToggle" type='checkbox' name='options' id='{{ field.name }}-{{ field.choices.index(f) }}'/>
|
<input @click="otherToggle" type='checkbox' name='{{ field.name }}' id='{{ field.name }}-{{ field.choices.index(choice) }}' value='other'/>
|
||||||
<label for='{{ field.name }}-{{ field.choices.index(f) }}'>{{ f[1] }}</label>
|
<label for='{{ field.name }}-{{ field.choices.index(choice) }}'>{{ choice[1] }}</label>
|
||||||
|
|
||||||
<div v-show="otherChecked">
|
<div v-show="otherChecked">
|
||||||
<input type='text' name='options' id='{{ field.name }}-other' aria-expanded='false'/>
|
<input type='text' name='{{ field.name}}_other' id='{{ field.name }}-other' aria-expanded='false'/>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user