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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

Python Tornado package error when running server -