当前位置: 首页>>代码示例>>PHP>>正文


PHP RSFormProHelper::showPreview方法代码示例

本文整理汇总了PHP中RSFormProHelper::showPreview方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::showPreview方法的具体用法?PHP RSFormProHelper::showPreview怎么用?PHP RSFormProHelper::showPreview使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSFormProHelper的用法示例。


在下文中一共展示了RSFormProHelper::showPreview方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFields

 function getFields()
 {
     $formId = JRequest::getInt('formId');
     $return = array();
     $this->_db->setQuery("SELECT p.PropertyValue AS ComponentName, c.*, ct.ComponentTypeName FROM #__rsform_components c LEFT JOIN #__rsform_properties p ON (c.ComponentId=p.ComponentId AND p.PropertyName='NAME') LEFT JOIN #__rsform_component_types ct ON (ct.ComponentTypeId = c.ComponentTypeId) WHERE c.FormId='" . $formId . "' ORDER BY c.Order");
     $components = $this->_db->loadObjectList();
     $properties = RSFormProHelper::getComponentProperties($components);
     foreach ($components as $component) {
         $data = $properties[$component->ComponentId];
         $data['componentId'] = $component->ComponentId;
         $data['componentTypeId'] = $component->ComponentTypeId;
         $data['ComponentTypeName'] = $component->ComponentTypeName;
         $field = new stdClass();
         $field->id = $component->ComponentId;
         $field->type_id = $component->ComponentTypeId;
         $field->name = $component->ComponentName;
         $field->published = $component->Published;
         $field->ordering = $component->Order;
         $field->preview = RSFormProHelper::showPreview($formId, $field->id, $data);
         $field->required = '-';
         if (!empty($data['REQUIRED'])) {
             $field->required = $data['REQUIRED'] == 'YES';
         }
         $field->validation = '-';
         if (isset($data['VALIDATIONRULE']) && $data['VALIDATIONRULE'] != 'none') {
             $field->validation = '<b>' . $data['VALIDATIONRULE'] . '</b>';
         }
         if (isset($data['VALIDATIONRULE_DATE']) && $data['VALIDATIONRULE_DATE'] != 'none') {
             $field->validation = '<b>' . $data['VALIDATIONRULE_DATE'] . '</b>';
         }
         $return[] = $field;
     }
     return $return;
 }
开发者ID:alvarovladimir,项目名称:messermeister_ab_rackservers,代码行数:34,代码来源:forms.php

示例2: RSpreviewComponent

function RSpreviewComponent($formId, $componentId)
{
    $data = RSFormProHelper::getComponentProperties($componentId);
    return RSFormProHelper::showPreview($formId, $componentId, $data);
}
开发者ID:jtresca,项目名称:nysurveyor,代码行数:5,代码来源:legacy.php


注:本文中的RSFormProHelper::showPreview方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。