public function configure()
 {
     $this->add(new ChoiceField('driver', array('choices' => DoctrineStep::getDrivers())));
     $this->add(new TextField('name'));
     $this->add(new TextField('host'));
     $this->add(new TextField('user'));
     $this->add(new RepeatedField(new PasswordField('password', array('required' => false)), array('required' => false, 'first_key' => 'Password', 'second_key' => 'Again')));
 }
Esempio n. 2
0
 public function buildForm(FormBuilder $builder, array $options)
 {
     $builder->add('driver', 'choice', array('choices' => DoctrineStep::getDrivers()))->add('name', 'text')->add('host', 'text')->add('user', 'text')->add('password', 'repeated', array('required' => false, 'type' => 'password', 'first_name' => 'Password', 'second_name' => 'Password again'));
 }