php - How to programatically display text in a symfony page without an input field -


i want display different messages page built symfony depending on situation. set creating hidden field , setting label whatever message want:

$builder->add('pagetopmsg', 'hidden', array(                     'label'     => $this->getpagetopmsg(),                     'required'  => false,                 )) 

that works, doesn't feel right. plus symfony says have create getters , setters in entity. messages , hidden field don't have relationship entity. there better way display messages on form dynamically.

if field not have relation entity, can add field directly in twig form , pass values through out controller

$this -> render('entity/edit.hmtl.twig', array('someparameters' => array('val1', 'val2'))); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -