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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

php - Cannot override Laravel Spark authentication with own implementation -

What is happening when Matlab is starting a "parallel pool"? -