Top "Symfony-forms" questions

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

Symfony2 Setting a default choice field selection

I am creating a form in the following manner: $form = $this->createFormBuilder($breed) ->add('species', 'entity', array( …

forms symfony default symfony-forms
How to change form field value in symfony 2

I have a form like below: class ItemType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder // ... ->…

symfony-forms symfony-2.3
Add error to Symfony 2 form element

I check some validation in my controller. And I want to add error to specific element of my form on …

php validation symfony symfony-forms
Simple check if form field has errors in Twig template

In Twig template I check if a field has an error like this: {% if form.points.get('errors') is not …

symfony twig symfony-forms
Symfony form read only field

How should I render read-only fields using Symfony form component? This is how I am trying to do that to …

symfony symfony-forms
Symfony validate form with mapped false form fields

I've got a form with extra fields added with the option mapped to false. But when I try to validate …

symfony validation symfony-forms
setting a placeholder attribute with translation in Symfony2 form input

I am using FOSUserBundle for managing my users. In order to register user, I reused the form of the bundle …

symfony twig symfony-forms fosuserbundle
Symfony twig how to add class to a form row

I am building a project in Symfony 2.3 using Twig. I want to add a class to the form row block. …

symfony twig symfony-forms
symfony2 customize form select options

I'm trying to do a simple form to add an activity with a name and a color. So I want …

php symfony symfony-forms
Symfony get form data in controller

I have this view: //login.html.twig <!DOCTYPE html> <html> <head> <meta http-equiv="…

symfony symfony-forms symfony-2.1