Top "Symfony-forms" questions

The Symfony form component is a standalone library that can be used outside of Symfony projects.

Symfony2: How to filter the options of an entity-choice form field by a certain attribute?

1.) The Situation (simplified) I have two entities: a Container-entity, which has exactly 1 Content-entity. The content_id is stored in the …

symfony doctrine-orm doctrine symfony-forms symfony-2.4
How to overwrite FOS user bundle form labels

I have a hard time overwriting labels that the FOS user bundle for Symfony2 uses. I'm already overwriting the Form …

symfony symfony-forms fosuserbundle
Description of Symfony2 form events?

This is the FormEvents class from Symfony2 repository on github. It's linked from the main article, How to Dynamically Generate …

symfony symfony-forms
Symfony2 entity field type alternatives to "property" or "__toString()"?

Using Symfony2 entity field type one should specify property option: $builder->add('customers', 'entity', array( 'multiple' => true, 'class' =&…

forms symfony symfony-forms
Doctrine does not update a simple array type field

Short Story (Edit) It is possible to store an array instead of a mapped association. In Symfony2, this is fairly …

php symfony doctrine doctrine-orm symfony-forms
How to render form_rest() as hidden fields in Symfony2/Twig?

I have a Form class that contains many fields. I would like to render few of them and pass the …

symfony twig symfony-forms hidden-field
Symfony 2 Create a entity form field with 2 properties

I am using symfony2 and have a form to save the relation of one user to some rules. These rules …

php symfony symfony-forms
Symfony 2 Embedded Forms

I am embedding a form type into another form type like so $builder->add('parent', new \Company\Bundle\Form\…

php forms symfony symfony-forms
How to disable specific item in form choice type?

I have a form with choice field of entities from database: public function buildForm(FormBuilderInterface $builder, array $options) { $builder->…

symfony symfony-forms
Explicitly print CSRF token field instead of form_rest(form)?

How can I explicitly print CSRF field instead of using {{ form_rest(form) }}? I need this because I'm going to …

forms symfony symfony-forms