public function buildForm(FormBuilderInterface $builder, array $options) { $subscriber = new AddMembreFieldSubscriber(); $builder->addEventSubscriber($subscriber); $builder->add('enabled', 'checkbox', array('label' => 'Adresse email validé ?', 'required' => false)); $builder->add('roles', 'choice', array('choices' => $this->refactorRoles($this->roles), 'required' => false, 'label' => 'Roles', 'multiple' => true)); parent::buildForm($builder, $options); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // add your custom field $builder->add('name'); $builder->add('file'); $builder->add('descripcion'); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // add your custom field $builder->add('name', null, array('label' => 'form.name', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('surname', null, array('label' => 'form.surname', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('jobTitle', null, array('label' => 'form.jobTitle', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('companyName', null, array('label' => 'form.companyName', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('addressLineFirst', null, array('label' => 'form.addressLineFirst', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('addressLineSecond', null, array('label' => 'form.addressLineSecond', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('zipcode', null, array('label' => 'form.zipcode', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('phone', null, array('label' => 'form.phone', 'translation_domain' => 'FOSUserBundle', 'required' => false)); $builder->add('country', 'country', array('label' => 'form.country', 'translation_domain' => 'FOSUserBundle', 'required' => false)); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // add your custom field $builder->remove('email'); $builder->remove('username'); $builder->remove('current_password'); $builder->add('name'); $builder->add('location'); $builder->add('street'); $builder->add('housenumber'); $builder->add('postalcode'); $builder->add('city'); $builder->add('facebook'); $builder->add('twitter'); $builder->add('website'); $builder->add('organiser'); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('failureNotifications', null, array('required' => false, 'label' => 'Notify me of package update failures')); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // Lista de campos customizaveis $builder->add('name', 'text', array('label' => 'Nome', 'required' => true))->add('linkedin', 'url', array('label' => 'LinkedIn', 'required' => false))->add('twitter', 'text', array('label' => 'Twitter', 'attr' => array('placeholder' => '@Usuario'), 'required' => false))->add('github', 'text', array('label' => 'Conta GitHub', 'required' => false)); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('sex', Type\ChoiceType::class, array('choices' => array('Un Homme' => '0', 'Une Femme' => '1'), 'expanded' => true, 'multiple' => false)); }
protected function buildBasicForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); }
public function buildForm(FormBuilderInterface $builder, array $options) { // On fait appel à la méthode buildForm du parent, qui va ajouter tous les champs à $builder parent::buildForm($builder, $options); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('firstname')->add('lastname'); parent::buildForm($builder, $options); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('firstName', 'text', array('attr' => array('minLength' => 2, 'maxLength' => 100, 'data-msg-required' => 'Please enter a first name')))->add('lastName', 'text', array('attr' => array('minLength' => 2, 'maxLength' => 100, 'data-msg-required' => 'Please enter a last name'))); parent::buildForm($builder, $options); $builder->remove('username')->remove('email')->add('email', 'email', array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle', 'attr' => array('class' => 'email', 'minLength' => 5, 'maxLength' => 255, 'placeholder' => '*****@*****.**', 'data-msg-required' => 'Please enter your email address')))->add('clearProfilePicture', 'checkbox', array('label' => 'Clear Picture', 'required' => false))->add('profilePictureFile', 'file', array('label' => 'Upload a custom avatar', 'required' => false)); }
/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('file', 'file')->add('nom'); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('roles', 'choice', array('label' => 'Rol', 'required' => true, 'choices' => array('ROLE_ADMIN' => 'Administrador', 'ROLE_USER' => 'Usuario'), 'multiple' => true)); $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'))); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); // add your custom field }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('failureNotifications', null, array('required' => false)); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('birthday', 'date', array('widget' => 'single_text', 'format' => 'dd/MM/yyyy', 'label' => 'birthday', 'translation_domain' => 'FOSUserBundle')); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('firstname', 'text', array('required' => true))->add('surname', 'text', array('required' => true))->add('address', 'text', array('required' => false))->add('phonenumber', 'text', array('required' => false))->add('siteweb', 'url', array('required' => false)); }
public function buildForm(FormBuilder $builder, array $options) { parent::buildForm($builder, $options); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('player', new PlayerType()); }