public function onContentPrepareForm($form, $data)
{
if(isset($data->socialData)) // $data->socialData populated during onContentPrepareData
{
$form->setFieldAttribute('name', 'default', $data->socialData->displayName);
$form->setFieldAttribute('email1', 'default', $data->socialData->emailVerified);
$form->setFieldAttribute('postal_code', 'default', $data->socialData->zip, 'profile');
$form->setFieldAttribute('phone', 'default', $data->socialData->phone, 'profile');
}
return true;
}
if(isset($this->data->socialData))
{
$this->form->setValue('name', null, $this->data->socialData->displayName);
$this->form->setValue('email1', null, $this->data->socialData->email);
$this->form->setValue('postal_code', 'profile', $this->data->socialData->zip);
$this->form->setValue('phone', 'profile', $this->data->socialData->phone);
}