本文整理汇总了PHP中UserForm::addItem方法的典型用法代码示例。如果您正苦于以下问题:PHP UserForm::addItem方法的具体用法?PHP UserForm::addItem怎么用?PHP UserForm::addItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserForm
的用法示例。
在下文中一共展示了UserForm::addItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form
$form1->addCheck("Active", ":active:*:CHECKED");
$form1->addCheck("Home", ":active_home:*:CHECKED");
$form1->addCheck("Newsletter", ":active_newsletter:*:CHECKED");
$form1->addEditor("research", "Research", 10, 60);
$form1->addEditor("publications", "Publications", 10, 60);
$form2 = new Form("dataEntry2", $usersGroupsRelation);
$form1->addSection("usergroups");
$form2->addRelationManager("groups", "Groups");
$form1->triggers($form2);
/* CUSTOMIZED PAGER BELOW */
$pager = new becontentPager();
$pager->setQuery("\n\tSELECT users.name, \n\t users.surname, \n\t users.username, \n\t users.email, \n\t users.active,\n\t\t users.active_home\n\t\t \n\t FROM users ");
$pager->setFilter("(name LIKE '%[search]%' OR surname LIKE '%[search]%' OR username LIKE '%[search]%')");
$pager->setOrder("name, surname");
$pager->setTemplate("dtml/report-users.html");
$form1->setPager($pager);
if (!isset($_REQUEST['action'])) {
$_REQUEST['action'] = "edit";
}
switch ($_REQUEST['action']) {
case "add":
$form1->addTextArea("message", "Message", 10, 50);
$main->setContent("body", $form1->addItem());
break;
case "edit":
$main->setContent("body", $form1->editItem());
break;
}
$main->close();
?>