public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('property', 'entity', array('query_builder' => function (EntityRepository $propertyRepo) { return $propertyRepo->createQueryBuilder("p"); }, 'required' => true, 'class' => ':Property', 'em' => $this->app['orm.em'], 'choice_label' => 'name', 'attr' => array('class' => 'form-control type-selection', 'placeholder' => 'The property for the item'))); $builder->addEventListener(FormEvents::POST_SET_DATA, array($this, 'onPostSetData')); $builder->addEventListener(FormEvents::PRE_SUBMIT, array($this, 'onPreSubmit')); $this->renderSubRelations($builder); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name'); $builder->add('description'); $builder->add('start'); $builder->add('end'); $builder->add('dueDate', null, array('widget' => 'single_text')); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('save', 'submit', array('label' => 'Submit')); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name_column', 'integer')->add('description_column', 'integer')->add('relations', 'collection', array('type' => new ColumnType($this->app), 'allow_add' => true)); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('auteur', 'text')->add('contenu', 'textarea'); }
public function buildForm(FormBuilderInterface $builder, array $options) { //add an event listener to populate the field property at page loading $builder->add('text', 'text', array('constraints' => array(new Assert\NotBlank(), new Assert\Length(array('min' => 3))), 'attr' => array('class' => 'form-control', 'placeholder' => 'The filter value', 'id' => 'values'), 'label' => 'With value:')); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('email', EmailType::class); }
public function buildForm(FormBuilderInterface $builder, array $options) { //add an event listener to populate the field property at page loading $builder->add('startyear', 'integer', array('constraints' => array(new Assert\NotBlank()), 'attr' => array('class' => 'form-control', 'placeholder' => 'The filter value', 'id' => 'values'), 'label' => 'start year'))->add('endyear', 'integer', array('constraints' => array(new Assert\NotBlank()), 'attr' => array('class' => 'form-control', 'placeholder' => 'The filter value', 'id' => 'values'), 'label' => 'end year')); }
/** * @param FormBuilderInterface $builder * @param array $options * * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('customerId')->add('sharingCode')->add('items', CollectionType::class, ['entry_type' => ItemFormType::class, 'allow_add' => true]); }
/** * @param FormBuilderInterface $builder * @param array $options * * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('id')->add('wishlist', EntityType::class, ['class' => Wishlist::class])->add('productId'); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add("first_name", TextType::class)->add("last_name", TextType::class)->add("email", EmailType::class)->add("address", TextType::class)->add("state_code", TextType::class)->add("zip_postal", TextType::class)->add("username", TextType::class)->add("password", TextType::class)->add("bio", TextareaType::class)->add("interests", ChoiceType::class, array("choices" => array('Backpal cal', 'California Calm'), "multiple" => true, "expanded" => true))->add("number_tours", ChoiceType::class, array("choices" => array('none' => 'none', '1-3' => '1 - 3', '4-6' => '4 - 6', '7+' => '7+'), "multiple" => false, "expanded" => true)); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('property', 'entity', array('query_builder' => function (EntityRepository $propertyRepo) { return $propertyRepo->createQueryBuilder("p"); }, 'required' => true, 'class' => ':Property', 'em' => $this->app['orm.em'], 'choice_label' => 'name', 'attr' => array('class' => 'form-control type-selection', 'placeholder' => 'The property for the item')))->add('column', 'integer'); }
/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name', TextType::class)->add('description', TextareaType::class)->add('coatOfArms', CoatOfArmsType::class, ['required' => false])->add('centuries', EntityType::class, ['class' => Century::class, 'choice_label' => 'century', 'multiple' => true, 'expanded' => true])->add('address', AddressType::class); }
/** * Build a new Form * * @param FormBuilderInterface $builder Form builder * @param array $options List of options * * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('title', 'text', ['label' => 'Title', 'required' => true])->add('leading', 'text', ['label' => 'Leading'])->add('body', 'text', ['label' => 'Content'])->add('author', 'text', ['label' => 'Author']); }
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('username', TextType::class)->add('email', EmailType::class)->add('plainPassword', RepeatedType::class, array('type' => PasswordType::class, 'invalid_message' => 'users.registration.password_mismatch', 'first_options' => ['label' => 'Password'], 'second_options' => ['label' => 'Repeat Password'])); }