Exemple #1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('name', 'text', ['label' => 'Nombre']);
     $builder->add('surname1', 'text', ['label' => 'Primer apellido']);
     $builder->add('surname2', 'text', ['label' => 'Segundo apellido']);
     $builder->add('birth', 'date', ['years' => $this->getyears(), 'label' => 'Fecha de nacimiento']);
     $builder->add('dni', 'text', ['label' => 'DNI']);
     $builder->add('address', 'text', ['label' => 'Dirección']);
     $builder->add('phone', 'text', ['label' => 'Teléfono']);
     $builder->add('username', 'text', ['label' => 'Email']);
     $builder->add('change_password', 'password', ['mapped' => false, 'label' => 'Contraseña', 'required' => false]);
     $builder->add('status', 'choice', ['choices' => [0 => 'Inactivo', 1 => 'Activo'], 'label' => 'Estado']);
     $builder->add('rol', 'choice', ['choices' => Member::getRolOptions()]);
     $builder->add('send', 'submit', ['label' => 'Guardar']);
 }