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 -

php - Cannot override Laravel Spark authentication with own implementation -

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