You can do this from the twig template:
{{ form_widget(form.birthdate, { 'attr': {'class': 'calendar'} }) }}
From http://symfony.com/doc/current/book/forms.html#rendering-each-field-by-hand
More Related Contents:
- Can you re-populate file inputs after failed form submission with PHP or JavaScript?
- Symfony 2 – how to pass data to formBuilder?
- How to make form_rest() not display a field with Symfony2?
- do not include AcmeDemoBundle using symfony installer
- Form submit file attach
- Symfony 3, Guard & Handlers
- Creating sign-in with my site functionality
- w3 schools form tutorial doesnt send email
- Understanding the “post/redirect/get” pattern
- How to set HTML value attribute (with spaces)
- Send value of submit button when form gets posted
- Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity
- Docker in MacOs is very slow
- Symfony2 conceptual issue: general bundles vs. specific ones
- Symfony2 – Force file download
- Form input field names containing square brackets like field[index]
- PHP form send email to multiple recipients
- How to add a delete button to a PHP form that will delete a row from a MySQL table
- Use Javascript to access a variable passed through Twig
- getting a checkbox array value from POST
- Injecting SecurityContext into a Listener prePersist or preUpdate in Symfony2 to get User in a createdBy or updatedBy Causes Circular Reference Error
- Symfony2, Dynamic DB Connection/Early override of Doctrine Service
- Laravel form html with PUT method for PUT routes
- Storing Form Data as a Session Variable
- Accessing Files Relative to Bundle in Symfony2
- How to get the server path to the web directory in Symfony2 from inside the controller?
- Symfony 2 load different template depending on user agent properties
- HTML form PHP post to self to validate or submit to new page
- Use custom delimiters in the current Twig template
- How to access a different controller from inside a controller Symfony2