Commit | Line | Data |
---|---|---|
929ca066 BA |
1 | <?php |
2 | ||
3 | namespace Mixstore\UserBundle\Form\Type; | |
4 | ||
5 | use Symfony\Component\Form\FormBuilderInterface; | |
6 | use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType; | |
7 | ||
8 | class RegistrationFormType extends BaseType | |
9 | { | |
10 | public function buildForm(FormBuilderInterface $builder, array $options) | |
11 | { | |
12 | parent::buildForm($builder, $options); | |
13 | ||
14 | // add your custom field | |
15 | $builder->remove('username'); // we use email as the username | |
16 | $builder->add('name'); // first name | |
17 | $builder->add('surname'); // last name | |
18 | } | |
19 | ||
20 | public function getName() | |
21 | { | |
22 | return 'mixstore_user_registration'; | |
23 | } | |
24 | } |