/**
  * Load member and associated address record data into the form fields.
  *
  * @param int  $fromMember
  * @param int  $mergeStrategy
  * @param null $fieldList
  * @return $this|Form
  * @internal param array|DataObject $action
  */
 public function loadDataFrom($fromMember, $mergeStrategy = 0, $fieldList = NULL)
 {
     if ($fromMember instanceof Member) {
         $shippingAddress = $fromMember->ShippingAddress();
         if (!$shippingAddress) {
             $shippingAddress = new Address_Shipping(['FirstName' => $fromMember->FirstName, 'Surname' => $fromMember->Surname]);
             $shippingAddress->Default = true;
             $shippingAddress->write();
             $fromMember->ShippingAddresses()->add($shippingAddress);
         }
         $billingAddress = $fromMember->BillingAddress();
         if (!$billingAddress) {
             $billingAddress = new Address_Billing(array('FirstName' => $fromMember->FirstName, 'Surname' => $fromMember->Surname));
             $billingAddress->Default = true;
             $billingAddress->write();
             $fromMember->BillingAddresses()->add($billingAddress);
         }
         $formData = $fromMember->toMap();
         foreach ($shippingAddress->toMap() as $fieldName => $value) {
             $formData["ShippingAddress.{$fieldName}"] = $shippingAddress->{$fieldName};
         }
         foreach ($billingAddress->toMap() as $fieldName => $value) {
             $formData["BillingAddress.{$fieldName}"] = $billingAddress->{$fieldName};
         }
         $formData = self::filter_data('update', $formData);
         parent::loadDataFrom($formData, $mergeStrategy);
     }
     return $this;
 }