Reputation: 391
I have a form made with Symfony2:
->add('password', 'repeated', array('data' => '', 'label' => 'Repeat New Password', 'type' => 'password', 'required' => false,
'first_options' => array('data' => '', 'label' => 'New password', 'always_empty' => true),
'second_options' => array('label' => 'Repeat new password'),
But in Chrome, the browser try to autocomplete the field New password.
How can I avoid this?
Thanks.
Upvotes: 0
Views: 5102
Reputation: 4293
Try this:
->add('password', 'repeated', array('data' => '', 'label' => 'Repeat New Password', 'type' => 'password', 'required' => false,
'first_options' => array('attr' => array("autocomplete" => "off")),
'second_options' => array('attr' => array("autocomplete" => "off")),
Upvotes: 6