php - Symfony 3 form read only field? (with FOSUserbundle) -
using symfony 3 fosuserbundle, how make custom field of user registration read only)
in registrationformtype.php, buildform
method tried:
->add('name', 'text', array('read_only' => true))
which gets invalidargumentexception
->add('name', 'text', array('read_only' => true))
which gets undefinedoptionsexception
try :
->add('name', textareatype::class, array( 'attr' => array( 'readonly' => true, ), ));
Comments
Post a Comment