I have a form that is bound to an entity, but it also has an extra unmapped field: (from the FormType class)
$builder
->add('name')
->add('qoh')
->add('serialNumber', 'text', array('mapped' => false, 'required' => false))
I want to pre-populate the serialNumber field from the controller with information taken from the request URL. The closest method I have found would be:
$form->setData(mixed $modelData)
but the API does not specify what form '$modelData' takes and nothing I've tried has had any effect.