Symfony Form Snipped For Widget Attributes


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. class ClientForm extends BaseClientForm
  2. {
  3. public function configure() {
  4. $fields = $this->getWidgetSchema()->getFields();
  5. foreach ($fields as $f) {
  6. $f->setAttribute("class", "client_form_field");
  7. }
  8. }
  9. }

URL: http://snippets.symfony-project.org/snippet/413

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.