3
에서 자신의 렌더링 나는 양식을 가지고 필드 중 하나입니다Symfony2 양식 : repated 유형과 나뭇 가지
$builder->add('password', 'repeated', array(
'type' => 'password',
'invalid_message' => 'The password fields must match.',
'options' => array('attr' => array('class' => 'password-field')),
'required' => true,
'first_options' => array('label' => 'Password'),
'second_options' => array('label' => 'Confirm Password'),
));
모든 양식 렌더링을 제외하고, 여기 괜찮습니다. 나는 나뭇 가지 파일 형식이 방법을 렌더링하는 데 사용하고 있습니다 :
<table style="width:500px; padding:30px">
<tr>
<td>
{{ form_label(form.email) }}
</td>
<td>
{{ form_widget(form.email, { 'attr': {'size': 30} }) }}
</td>
</tr>
<tr>
<td>
{{ form_label(form.password.first) }}
</td>
<td>
{{ form_row(form.password.first, { 'attr': {'size': 30} }) }}
</td>
</tr>
<tr>
<td>
{{ form_label(form.password.second) }}
</td>
<td>
{{ form_row(form.password.second, { 'attr': {'size': 30} }) }}
</td>
</tr>
<tr>
....
....
문제는 repated 유형, 레이블이 중복된다는 점이다 : 첨부 된 이미지를 참조하십시오.
해결 방법을 알고 계십니까?
미리 감사드립니다.
완벽하게, 정말 고마워. –