How could I autopopulate a form that contains entity option things? I'm trying to do an update details form that when called already contains that users information.
I'm using Symphony 2.1.
The form would look like this:
$builder
//->add('createdate')
//->add('modifydate')
->add('schoolname')
->add('schoolprofile')
->add('streetaddress')
->add('streetaddressext')
->add('country', 'entity', array(
'class' => 'IFS\Account\RegisterSchoolBundle\Entity\Country',
'property' => 'countryname',
))
->add('schoolprogramid', 'entity', array(
'class' => 'IFS\Account\RegisterSchoolBundle\Entity\Schoolprogram',
'property' => 'displayname',
))
->add('schoolsizegroupid', 'entity', array(
'class' => 'IFS\Account\RegisterSchoolBundle\Entity\Schoolsizegroup',
'property' => 'displayname',
))
->add('state', 'entity', array(
'class' => 'IFS\Account\RegisterSchoolBundle\Entity\State',
'property' => 'statename',
))
->add('city', 'entity', array(
'class' => 'IFS\Account\RegisterSchoolBundle\Entity\City',
'property' => 'cityname',
))
;
}