php - With Symfony 3, how to display a read-only field as a label ? (in FOSUBundle's registration form) -


using symfony 3 , overridden fosuserbundle's registration form, have readonly field:

->add('name', texttype::class, array('attr' => array('readonly' => true))) 

for now, appears textbox, appear text/label instead. see nothing such "labeltype". possible this?

it need customize appearance of textbox when has readonly attribute. simple solution single css style:

// style.css input[readonly] {     border: none;     // more custom styles } 

i mean, there no need special in symfony , useful input readonly form fields.


Comments

Popular posts from this blog

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

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -