ラベルなしでレンダリングしたいこのフォーム要素がありますが、方法が見つかりません...
$builder
->add('gender', 'choice', array(
'expanded' => true,
'choices' => array(
'Male' => 'm',
'Female' => 'f',
)
))
;
助けてください、これは機能していません:
{% block choice_widget %}
{% spaceless %}
{% for child in form %}
<input type="radio" value="{{ child.get('value') }}">
{% endfor %}
{% endspaceless %}
{% endblock choice_widget %}
私は得ていますArray to string conversion
私がやりたいのは、画像をクリックして選択するだけの、画像ベースの性別セレクターです。