Hi, Is the decision to not allow custom HTML attributes (e.g. class="mycss") to be added to form fields from a form class a deliberate one? Correct me if I'm wrong, but in Symfony 1 I thought you could add custom attributes to form fields from the form class simply by passing an option when you created the widget.
There is no way to do this in Symfony 2, other then by manually rendering fields in a template (http://symfony.com/doc/2.0/book/ forms.html#rendering-each-field-by-hand), which defeats the purpose of having a form class. I guess what I'm looking for is an extra option in the FieldType class so that I can write code like... $builder->add("name", "text", options("required" => false, "attr" => array("class" => "mycss"); and get a form field rendered like this... <input type="text" class="mycss /> Thanks, Steve -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
