Symfony2 - FosUserBundle を介してレンダリングされたフォームがネストされるのを防ぐにはどうすればよいですか? ビルダーには 2 つのフィールドがあり、そのうちの 1 つは繰り返しフィールドです。これはネストされたものとしてレンダリングされるようです
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('current_password', 'password', array(
'label' => 'form.current_password',
'translation_domain' => 'FOSUserBundle',
'mapped' => false,
'constraints' => new UserPassword(),
));
$builder->add('new', 'repeated', array(
'type' => 'password',
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => 'form.new_password'),
'second_options' => array('label' => 'form.new_password_confirmation'),
'invalid_message' => 'fos_user.password.mismatch',
));
}
フォームがレンダリングされたときに得られるものは次のとおりです: http://pastebin.com/Np2bvgvH
ご覧のとおり、繰り返されるフォーム フィールドは別の "FormRows"-div にラップされています。余分な FormRows のない単純な "FormRow"-div にしたいのです。レイアウトは、ネストされた 2 つの FormRows を持つことを意図していません
私の問題を理解していただければ幸いです。
ありがとうございました