Answer the question
In order to leave comments, you need to log in
How to explicitly set the name of the form field in symphonic form?
it is necessary that the name was not form[pole], but simply pole. How can this be done?
Answer the question
In order to leave comments, you need to log in
Or via getName of the form class:
class RegisterType extends AbstractType
{
public function getName()
{
return '';
}
}
$form = $this->get('form.factory')->createNamedBuilder('', 'form', $defaultData)
->add('name', 'text')
->add('email', 'email')
->getForm();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question