我有一个表单,想用symfony自定义它:
<input type="radio" name="type" value="auto" onClick="getMarques('auto')" id="check1">
<label class="s-submitCheckLabel" for="check1"><span class="m-circle"></span></label>
<label class="s-submitCheck" for="check1">Auto</label>
我已经试过了:
{% for child in formAnnonce.category %}
{{ form_widget(child, {'attr' : {'class': 'form-check-input'}, {'name': 'type'}, {'id': 'check1'} }) }}
{{ form_label(child)}}
{{ form_help(child) }}
{{ form_errors(child) }}
{% endfor %}
1条答案
按热度按时间9jyewag01#