Here is my form:
$studentObj = $this->getDoctrine()->getRepository('ProjectEntityBundle:Student')
->findBy(array('user' => $userId));
$form = $this->createFormBuilder($studentObj)
->add('fname', 'text', array('label' => 'First Name'))
->add('lname', 'text', array('label' => 'Last Name'))
->add('save', 'submit', array('label' => 'Save My Profile'))
->getForm();
I pass $userId from route variable. But it does not pre fill the data. How do I solve the issue?