I am rendering a form, and every widget has an ID like : form_username, form_password, etc
and every corresponding label has a for field as for=”form_username”
can I customize this ID and For attribute pair? Because I am rendering 2 forms on a page, and their field names are clashing…
edit : Here is an example code where I want to customize the Form Name.
$form = $this->createFormBuilder($user, array('validation_groups' => array('registration')))
->add('username', 'text')
->add('email', 'email')
->add('password', 'repeated', array('type' => 'password'))
->getform();
You need to provide different names for the forms when you create them in your controller: