Answer the question
In order to leave comments, you need to log in
How to attach your Entity to Form/Type (Symfony 2.8)?
How to style Type so that when creating a textarea field, the maxlenth attribute is taken from the Assert Length max of the given Entity?
I found an auto-detection for the old version of symfony2
symfony-gu.ru/documentation/ru/html/book/forms.htm...
if we replace TextareaTepe::class with null, then it works like that, but input text is inserted, and I need the same for textarea :->add('caption', null,'required'=>false])
Answer the question
In order to leave comments, you need to log in
Not TextareaT e pe, but TextareaT y pe
api.symfony.com/2.6/Symfony/Component/Form/Extensi...
input text because the field is defined as a string in the entity. She will automatically substitute text, not textarea.
As for maxlenth.
symfony.com/doc/current/reference/forms/types/text...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question