I have problems with setting form wrapper custom ID. $options['attr']['id'] dont seem to work. All options passed to createForm() method seems to be ignored... I'm working on Symfony 2.1 beta 1
Form setup:
$login_form = $this->createForm(new LoginType(), $user, array(
'attr' => array(
'id' => 'login-form'
)
));
which is passed to the view:
{{ form_widget(login_form) }}
But it produces:
<div id="login">
<div>
<label class="required">Mobile</label>
<input type="text" maxlength="255" required="required" name="login[mobile]" id="login_mobile">
</div>
<div>
<label class="required">Password</label>
<input type="text" maxlength="255" required="required" name="login[password]" id="login_password">
</div>
</div>
So the form wrapper have id="login", instead of "login-form"