예제 #1
0
 public function actionGetPlacedAttributeByName($attributeName, $attributeLabel)
 {
     $model = new ZurmoActiveForm(false);
     $webFormAttributeForm = new ContactWebFormAttributeForm();
     $webFormAttributeForm->label = $attributeLabel;
     $allAttributes = ContactWebFormsUtil::getAllAttributes();
     $attributeData = $allAttributes[$attributeName];
     $resolvedPlacedAttribute = ContactWebFormsUtil::resolvePlacedAttributeByName($webFormAttributeForm, $model, $attributeName, $attributeData);
     $content = ContactWebFormsUtil::getPlacedAttributeContent($resolvedPlacedAttribute);
     Yii::app()->getClientScript()->setToAjaxMode();
     Yii::app()->getClientScript()->render($content);
     echo $content;
 }