Reputation: 1931
I would like to use form_row(form.myfield)
in my twig template to render the whole row (label, error, widget) of a form field.
But I would like to overwrite the form_widget()
function to give out some help message.
My question now is: How to extend/overwrite the form_row()
function to add an attribute with my help message, that is transfered to the form_widget()
function?
What i would like to use:
{ form_row(form.firstname, { 'attr': {'helpmsg': 'I am your help buddy'} }
Upvotes: 1
Views: 4196
Reputation: 23255
Apparently, you were looking for this page of the documentation.
Upvotes: 3