本文整理汇总了PHP中cmsForm::displayForm方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsForm::displayForm方法的具体用法?PHP cmsForm::displayForm怎么用?PHP cmsForm::displayForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsForm
的用法示例。
在下文中一共展示了cmsForm::displayForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertForm
function insertForm($form_title){
cmsCore::loadClass('form');
return cmsForm::displayForm(trim($form_title), array(), false);
}
示例2: array
echo $_LANG['AD_FIELD_ADD'];
} else {
echo $_LANG['AD_FIELD_SAVE'];
}
?>
" />
</p>
</form>
</td>
<td width="440" valign="top" class="proptable"><h4 style="border-bottom:solid 1px black;font-size: 14px; margin-bottom: 5px"><b><?php
echo $_LANG['AD_PREVIEV'];
?>
</b></h4>
<?php
echo cmsForm::displayForm($item_id, array(), true);
?>
</td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function(){
show();
});
</script>
{/tabs}
<?php
echo jwTabs(ob_get_clean());
?>
<?php
示例3: array
cmsCore::addSessionMessage($_LANG['AD_DO_SUCCESS'] . '.');
cmsCore::redirect('?view=components&do=config&id=' . $id . '&opt=list');
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($opt == 'list') {
$fields = array(array('title' => 'id', 'field' => 'id', 'width' => '40'), array('title' => $_LANG['TITLE'], 'field' => 'title', 'width' => '', 'link' => '?view=components&do=config&id=' . $id . '&opt=edit&item_id=%id%'), array('title' => $_LANG['AD_E-MAIL'], 'field' => 'email', 'width' => '150'));
$actions = array(array('title' => $_LANG['EDIT'], 'icon' => 'edit.gif', 'link' => '?view=components&do=config&id=' . $id . '&opt=edit&item_id=%id%'), array('title' => $_LANG['DELETE'], 'icon' => 'delete.gif', 'confirm' => $_LANG['AD_FORM_DELETE'], 'link' => '?view=components&do=config&id=' . $id . '&opt=delete&item_id=%id%'));
cpListTable('cms_forms', $fields, $actions, '', 'id DESC');
}
if (in_array($opt, array('add', 'edit'))) {
if ($opt == 'add') {
cpAddPathway($_LANG['AD_NEW_FORM']);
$mod = array('showtitle' => 1, 'form_action' => '/forms/process', 'tpl' => 'form', 'only_fields' => 0);
} else {
$item_id = cmsCore::request('item_id', 'int');
$field_id = cmsCore::request('field_id', 'int');
$mod = cmsCore::c('db')->get_fields('cms_forms', "id = '" . $item_id . "'", '*');
$field = cmsCore::c('db')->get_fields('cms_form_fields', "id='" . $field_id . "'", '*');
if ($field) {
$field['config'] = cmsCore::yamlToArray($field['config']);
}
echo '<h3>' . $_LANG['AD_FORM'] . ': ' . $mod['title'] . '</h3>';
cpAddPathway($mod['title']);
}
$tpl = cmsCore::c('page')->initTemplate('components', 'forms_add')->assign('opt', $opt)->assign('users_opt', $inCore->getListItems('cms_users', cmsCore::getArrVal($mod, 'user_id', 0), 'nickname', 'ASC', 'is_deleted=0 AND is_locked=0', 'id', 'nickname'))->assign('mod', $mod);
if ($opt == 'edit') {
$last_order = 1 + cmsCore::c('db')->get_field('cms_form_fields', "form_id='" . $mod['id'] . "' ORDER BY ordering DESC", 'ordering');
$tpl->assign('last_order', $last_order)->assign('field', $field)->assign('form_html', cmsForm::displayForm($item_id, array(), true));
}
$tpl->display();
}