/**
  * @param form_persistentdocument_hidden $field
  * @param DOMElement $fieldElm
  * @param mixed $rawValue
  * @return string
  */
 public function buildXmlElementResponse($field, $fieldElm, $rawValue)
 {
     switch ($field->getIsRecommand()) {
         case 'site':
             return website_WebsiteModuleService::getInstance()->getCurrentWebsite()->getUrl();
             break;
         case 'page':
             try {
                 return LinkHelper::getUrl(DocumentHelper::getDocumentInstance($rawValue));
             } catch (Exception $e) {
                 Framework::exception($e);
             }
             return website_WebsiteModuleService::getInstance()->getCurrentWebsite()->getUrl();
     }
     return parent::buildXmlElementResponse($field, $fieldElm, $rawValue);
 }
 /**
  * @param form_persistentdocument_hidden $field
  * @return string
  */
 private static function fromHiddenFieldDocument($field, $value)
 {
     // build required attributes
     return self::hiddenBox($field->getFieldName(), $field->getId(), $value);
 }