문제

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'} }
도움이 되었습니까?

해결책

Apparently, you were looking for this page of the documentation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top