本文整理汇总了PHP中FormBuilder::setVisible方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::setVisible方法的具体用法?PHP FormBuilder::setVisible怎么用?PHP FormBuilder::setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::setVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FormBuilder
<div class="center">
<?php
$formBuilder = new FormBuilder("message-write", "/restful/user/panels/messages/send.php");
$fields[] = array("id" => "to", "type" => "textinput", "label" => "A:", "validation" => "required,Specifica a chi inviare il messaggio");
$fields[] = array("id" => "subject", "type" => "textinput", "label" => "Oggetto:", "validation" => "required, Specifica l'oggetto");
// Aggiungi multiplo e importante solo se l'utente e' admin
if ($currentUser->isAdmin()) {
$fields[] = array("id" => "multiple", "type" => "checkbox", "label" => "Invia a tutti i membri:");
$fields[] = array("id" => "important", "type" => "checkbox", "label" => "Importante:", "value" => true);
}
$fields[] = array("id" => "message", "type" => "textarea", "validation" => "required,Devi scrivere un messaggio");
$formBuilder->addFields($fields);
$formBuilder->setCloseable(true);
$formBuilder->setDefaultSubmit("Invia");
$formBuilder->setVisible(false);
$formBuilder->addWidget(new BbButtonWidget($formBuilder->getDOMId("message"), "code|quote|g|c|s"));
$formBuilder->addWidget(new SmilesWidget($formBuilder->getDOMId("message")));
echo $formBuilder->render();
?>
</div>
<script language='javascript'>
"use strict";
var Messages = (function(){
var p = {
order : "date_desc",
folder : "",
folder_name : "",
important : false,
page : 1,