Beispiel #1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('email', 'email', array('label' => 'form.email', 'translation_domain' => 'symbb_frontend', 'attr' => array('placeholder' => 'Your E-Mail')))->add('username', null, array('label' => 'form.username', 'translation_domain' => 'symbb_frontend', 'attr' => array('placeholder' => 'Your Username')))->add('plainPassword', 'repeated', array('type' => 'password', 'options' => array('translation_domain' => 'symbb_frontend'), 'first_options' => array('label' => 'form.password', 'attr' => array('placeholder' => 'Your Password')), 'second_options' => array('label' => 'form.password_confirmation', 'attr' => array('placeholder' => 'Retype your Password')), 'invalid_message' => 'fos_user.password.mismatch', 'constraints' => $this->usermanager->getPasswordValidatorConstraints()))->add('terms', 'checkbox', array('label' => 'Read and accepted Terms of Use', 'translation_domain' => 'symbb_frontend', 'mapped' => false, 'required' => true));
     $builder->add('recaptcha', 'formextra_recaptcha', array('widget_options' => array('theme' => 'white'), 'mapped' => false));
 }
Beispiel #2
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('plainPassword', 'repeated', array('type' => 'password', 'invalid_message' => 'The password fields must match.', 'options' => array('attr' => array('class' => 'password-field')), 'required' => true, 'first_options' => array('label' => 'Password'), 'second_options' => array('label' => 'Repeat Password'), 'constraints' => $this->usermanager->getPasswordValidatorConstraints()));
 }