I believe that the right way to do what you want to achieve is as follows:
->add('Name', 'text') ->add('Login', 'text') ->add('Password', 'password') ->add('ConfirmPassword', 'password', array('label' =>'Confirm Password')) ->add('Email', 'email') ->add('ConfirmEmail', 'email')
The first argument to the add method is the name field (it must be unique in the form). The second is type , and it is responsible for the form that the widget takes when rendering. The list of built-in types is here . The third argument is an array of parameters. Each type has its own set of possible options . Indeed, some types have a widget parameter. For example, date has this option. But password and email types do not have this capability.
source share