本文整理汇总了PHP中RSFormProHelper::getFrontComponentBody方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::getFrontComponentBody方法的具体用法?PHP RSFormProHelper::getFrontComponentBody怎么用?PHP RSFormProHelper::getFrontComponentBody使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSFormProHelper
的用法示例。
在下文中一共展示了RSFormProHelper::getFrontComponentBody方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RSfrontComponentBody
function RSfrontComponentBody($formId, $componentId, $data, $value = '')
{
return RSFormProHelper::getFrontComponentBody($formId, $componentId, $data, $value);
}
示例2: showForm
//.........这里部分代码省略.........
$start_page++;
}
}
}
$find = array();
$replace = array();
$all_data = RSFormProHelper::getComponentProperties($components);
foreach ($components as $component) {
$data = $all_data[$component->ComponentId];
$data['componentTypeId'] = $component->ComponentTypeId;
$data['ComponentTypeName'] = $component->ComponentTypeName;
$data['Order'] = $component->Order;
// Pagination
if ($component->ComponentTypeId == 41) {
$data['PAGES'] = $pages;
$page_progress[] = array('show' => @$data['DISPLAYPROGRESS'] == 'YES', 'text' => @$data['DISPLAYPROGRESSMSG']);
} elseif ($component->ComponentTypeId == 13) {
$data['SUBMITS'] = $submits;
if ($component->ComponentId == end($submits)) {
$page_progress[] = array('show' => @$data['DISPLAYPROGRESS'] == 'YES', 'text' => @$data['DISPLAYPROGRESSMSG']);
}
}
// Caption
$find[] = '{' . $component->name . ':caption}';
$caption = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$caption = '';
} elseif (isset($data['CAPTION'])) {
$caption = $data['CAPTION'];
}
$replace[] = $caption;
// Body
$find[] = '{' . $component->name . ':body}';
$replace[] = RSFormProHelper::getFrontComponentBody($formId, $component->ComponentId, $data, $val, in_array($component->ComponentId, $validation), $form->FormLayoutName);
// Description
$find[] = '{' . $component->name . ':description}';
$description = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$description = '';
} elseif (isset($data['DESCRIPTION'])) {
$descrtmp = $data['DESCRIPTION'];
}
if (trim($descrtmp) != '') {
$description = '<a data-placement="top" rel="clickover" data-original-title="info" data-content="' . $descrtmp . '" class="btn btn-small btn-link">info</a>';
} else {
$description = '';
}
$replace[] = $description;
// Validation message
$find[] = '{' . $component->name . ':validation}';
$validationMessage = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$validationMessage = '';
} elseif (isset($data['VALIDATIONMESSAGE'])) {
if (!empty($validation) && in_array($component->ComponentId, $validation)) {
$validationMessage = '<span id="component' . $component->ComponentId . '" class="formError">' . $data['VALIDATIONMESSAGE'] . '</span>';
} else {
$validationMessage = '<span id="component' . $component->ComponentId . '" class="formNoError">' . $data['VALIDATIONMESSAGE'] . '</span>';
}
}
$replace[] = $validationMessage;
}
unset($all_data);
$u = RSFormProHelper::getURL();
//Trigger Event - onInitFormDisplay
$mainframe->triggerEvent('rsfp_f_onInitFormDisplay', array(array('find' => &$find, 'replace' => &$replace, 'formLayout' => &$formLayout)));
示例3: showForm
//.........这里部分代码省略.........
$start_page++;
}
}
}
$find = array();
$replace = array();
$all_data = RSFormProHelper::getComponentProperties($components);
foreach ($components as $component) {
$data = $all_data[$component->ComponentId];
$data['componentTypeId'] = $component->ComponentTypeId;
$data['ComponentTypeName'] = $component->ComponentTypeName;
$data['Order'] = $component->Order;
// Pagination
if ($component->ComponentTypeId == 41) {
$data['PAGES'] = $pages;
$page_progress[] = array('show' => @$data['DISPLAYPROGRESS'] == 'YES', 'text' => @$data['DISPLAYPROGRESSMSG']);
} elseif ($component->ComponentTypeId == 13) {
$data['SUBMITS'] = $submits;
if ($component->ComponentId == end($submits)) {
$page_progress[] = array('show' => @$data['DISPLAYPROGRESS'] == 'YES', 'text' => @$data['DISPLAYPROGRESSMSG']);
}
}
// Caption
$find[] = '{' . $component->name . ':caption}';
$caption = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$caption = '';
} elseif (isset($data['CAPTION'])) {
$caption = $data['CAPTION'];
}
$replace[] = $caption;
// Body
$find[] = '{' . $component->name . ':body}';
$replace[] = RSFormProHelper::getFrontComponentBody($formId, $component->ComponentId, $data, $val, in_array($component->ComponentId, $validation));
// Description
$find[] = '{' . $component->name . ':description}';
$description = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$description = '';
} elseif (isset($data['DESCRIPTION'])) {
$description = $data['DESCRIPTION'];
}
$replace[] = $description;
// Validation message
$find[] = '{' . $component->name . ':validation}';
$validationMessage = '';
if (isset($data['SHOW']) && $data['SHOW'] == 'NO') {
$validationMessage = '';
} elseif (isset($data['VALIDATIONMESSAGE'])) {
if (!empty($validation) && in_array($component->ComponentId, $validation)) {
$validationMessage = '<span id="component' . $component->ComponentId . '" class="formError">' . $data['VALIDATIONMESSAGE'] . '</span>';
} else {
$validationMessage = '<span id="component' . $component->ComponentId . '" class="formNoError">' . $data['VALIDATIONMESSAGE'] . '</span>';
}
}
$replace[] = $validationMessage;
}
unset($all_data);
$u = RSFormProHelper::getURL();
//Trigger Event - onInitFormDisplay
$mainframe->triggerEvent('rsfp_f_onInitFormDisplay', array(array('find' => &$find, 'replace' => &$replace, 'formLayout' => &$formLayout)));
$user = JFactory::getUser();
$jconfig = JFactory::getConfig();
array_push($find, '{global:formtitle}', '{global:username}', '{global:userip}', '{global:userid}', '{global:useremail}', '{global:fullname}', '{global:sitename}', '{global:siteurl}');
array_push($replace, $form->FormTitle, $user->get('username'), isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '', $user->get('id'), $user->get('email'), $user->get('name'), $jconfig->getValue('config.sitename'), JURI::root());
$formLayout = str_replace($find, $replace, $formLayout);