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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -