How to extend/overwrite symfony2 form_row function
-
26-10-2019 - |
Pergunta
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'} }
Solução
Apparently, you were looking for this page of the documentation.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow