本文整理汇总了PHP中Chtml::hiddenField方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::hiddenField方法的具体用法?PHP Chtml::hiddenField怎么用?PHP Chtml::hiddenField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chtml
的用法示例。
在下文中一共展示了Chtml::hiddenField方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionData
public function actionData($id = null, $metric = null)
{
if (isset($_POST['data'])) {
foreach ($_POST['data'] as $id => $value) {
$model = Data::model()->findByPk($id);
$model->value = is_numeric($value) ? (int) $value : null;
$model->save();
}
echo Sector::getJson();
} else {
$metricModel = Metric::model()->findByAttributes(array('name' => $metric));
$metric_ids = CHtml::listData($metricModel->getMetricWithDescendants(), 'id', 'id');
if ($metricModel->type == '1') {
echo $this->renderPartial('dataForm', array('sector' => Sector::model()->findByPk($id), 'metric_ids' => $metric_ids));
} elseif ($metricModel->type = '2') {
foreach (Sector::model()->findByPk($id)->square->sectors as $sector) {
echo CHtml::tag('h3', array(), $sector->title);
echo $this->renderPartial('dataForm', array('sector' => $sector, 'metric_ids' => $metric_ids));
echo Chtml::hiddenField('sector_id', $id);
}
}
}
}
示例2: array
echo $post->getError('attachment__id');
?>
</p>
</div>
</div>
</div>
<div class='clear'></div>
<div class="form-actions">
<?php
echo CHtml::submitButton(Yii::t('app', 'Изменить'), array('class' => 'btn green', 'name' => 'btn_edit'));
?>
<?php
if (Yii::app()->user->checkAccess('AdminBlogPosts')) {
?>
<?php
echo CHtml::link(Yii::t('app', 'Назад'), $this->createUrl('index'), array('class' => 'btn grey'));
}
?>
</div>
</div>
</div>
<link href="<?php
echo Yii::app()->params['hostMetronikStatic'];
?>
/public/assets/global/plugins/bootstrap-datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" id="locale"></script>
<?php
echo Chtml::hiddenField(FALSE, Yii::app()->params['hostMetronikStatic'] . '/public/assets/global/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.' . Yii::app()->language . '.js', array('id' => 'scriptSrc'));
$this->endWidget();
?>
示例3: array
<?php
echo $form->error($model, 'param_value');
?>
</div>
<div id="param_value_error"></div>
<div class="jFormComponent" id="param_parent">
<?php
echo CHtml::label(Yii::t('config', 'Parent Param'), 'param_parent');
?>
<?php
if ($action == 'create') {
echo CHtml::dropDownList('param_parent', null, $params_list, array('empty' => Yii::t('config', '- None -')));
} else {
echo CHtml::dropDownList('param_parent_list', 0, $params_list, array('empty' => Yii::t('config', '- None -'), 'disabled' => true));
echo Chtml::hiddenField('param_parent', !empty($params_list) ? $params_list[0] : "");
}
?>
</div>
<div class="jFormComponent button">
<?php
echo CHtml::submitButton($action == 'create' ? Yii::t('config', 'Create') : Yii::t('config', 'Save'));
?>
</div>
<?php
$this->endWidget();
?>
</div><!-- form -->
示例4: array
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'cfgCollection', 'enableAjaxValidation' => true));
echo Chtml::hiddenField("scenario", $model->scenario);
?>
<div id="setAlbumAspect" class="containerMessage displaySetting">
<div class="titleCategoryRow"><?php
echo $this->tr('cPanelAlbum') . ' - ' . $this->tr('cpAppearance');
?>
</div>
<div class="row">
<?php
echo FBAdmin::helpTooltip('itemsOnPaginate');
?>
<?php
echo $form->labelEx($model, 'itemsOnPaginate');
?>
<?php
$this->widget('zii.widgets.jui.CJuiSlider', array('id' => 'itemsOnPaginateSlider', 'value' => $model->itemsOnPaginate, 'options' => array('min' => 0, 'max' => 500, 'slide' => 'js:function(event, ui) {
$("#Cfg_itemsOnPaginate").val(ui.value);
}'), 'htmlOptions' => array('style' => 'height:12px;width:140px;margin-top:4px;float:left; margin-right:12px;')));
?>
<?php
echo $form->textField($model, 'itemsOnPaginate', array('class' => 'valSlider', 'readonly' => 'readonly'));
?>
<?php
echo FBAdmin::getDefaultValue('album', 'itemsOnPaginate');
?>
</div>
<div class="row">
示例5: while
echo Yii::t('settings', 'Disable the field if you do not want to receive email notification associated.');
?>
</p>
<?php
while (list($key, $value) = each($categories)) {
?>
<div class="jFormComponent">
<?php
echo $form->labelEx($categories[$key]['model'], 'notification_category_ptr');
?>
<?php
echo ucfirst($categories[$key]['category']) . " " . $categories[$key]['type'] . " " . $form->checkBox($categories[$key]['model'], 'send_mail', array('uncheckValue' => false, 'onclick' => 'javascript:setCheck(this,' . $key . ')'));
?>
<?php
echo Chtml::hiddenField('send_mail' . $key);
?>
</div>
<?php
}
?>
<div class="jFormComponent button">
<?php
echo CHtml::button(Yii::t('settings', 'Salva'), array('class' => 'btn', 'submit' => array('settings/update')));
?>
</div>
<?php
$this->endWidget();
?>
示例6: array
'WaterRequestParameters'=>'WaterRequestParameters',
'Zones'=>'Zones'),
array('labelOptions'=>array('style'=>'display:inline'),
'separator'=>'<br>',
'onChange'=>CHtml::ajax(array('type'=>'POST', 'url'=>array('fileUpload/updateFields'),
'success'=>'function(data){
$("#fields").html(data);
$("#fields").find("select").uniform();
}' )),
));*/
echo CHtml::radioButtonList('table', '', array('Zones' => Yii::t('generic', 'Zones'), 'WaterRequestParameters' => Yii::t('generic', 'Parameters'), 'Formulas' => Yii::t('generic', 'Formulas'), 'WaterSupply' => Yii::t('generic', 'Water Supply'), 'SAOperativeMargin' => Yii::t('generic', 'Operative Margin')), array('labelOptions' => array('style' => 'display:inline'), 'separator' => '<br>', 'onChange' => CHtml::ajax(array('type' => 'POST', 'url' => array('fileUpload/updateFields'), 'success' => 'function(data){
$("#fields").html(data);
$("#fields").find("select").uniform();
}'))));
echo Chtml::hiddenField('xlsAttributes', json_encode($xlsAttributes));
echo Chtml::hiddenField('filename', $filename);
?>
</div>
<div id="fields" style="margin-top:40px"></div>
<div class="jFormComponent button">
<?php
echo CHtml::submitButton(Yii::t('excel', 'Save'));
?>
</div>
<?php
$this->endWidget();
?>
示例7: array
<link href="<?php
echo Yii::app()->params['hostMetronikStatic'];
?>
/public/assets/global/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<?php
echo Yii::app()->params['hostMetronikStatic'];
?>
/public/assets/global/plugins/fancybox/source/jquery.fancybox.pack.js"></script>
<link href="<?php
echo Yii::app()->params['hostMetronikStatic'];
?>
/public/assets/global/css/plugins.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" id="locale"></script>
<?php
echo Chtml::hiddenField(FALSE, Yii::app()->params['hostMetronikStatic'] . '/public/assets/global/plugins/bootstrap-datepicker/js/locales/bootstrap-datepicker.' . Yii::app()->language . '.js', array('id' => 'scriptSrc'));
echo Chtml::hiddenField(FALSE, Yii::app()->params['hostMetronikStatic'] . '/public/assets/global/img', array('id' => 'imgLoaderSrc'));
?>
<div class="note note-info">
<i class="fa fa-info" style="margin-right: 10px;"></i> <?php
echo Yii::t('app', 'Поля помеченные');
?>
<span class="required">*</span> <?php
echo Yii::t('app', 'обязательны к заполнению.');
?>
</div>
<div class="portlet box green">
<div class="portlet-title">
<h3 class="caption"><i class="fa fa-cubes" style="margin-right: 10px;"></i> <?php
echo Yii::t('app', 'Создание продукта');
示例8: array
<div class="flash-success">
<?php
echo Yii::app()->user->getFlash('notification_success');
?>
</div>
<?php
} else {
if (Yii::app()->user->hasFlash('notification_error')) {
?>
<div class="flash-error">
<?php
echo Yii::app()->user->getFlash('notification_error');
?>
</div>
<?php
}
}
?>
<div class="form">
<?php
$form = $this->beginWidget('UniActiveForm', array('id' => 'notifications-form', 'enableAjaxValidation' => false));
echo Chtml::hiddenField('what', $what);
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'columns' => array(array('name' => CHtml::checkBox("call", null, array("value" => "all", "id" => "call")), 'value' => 'CHtml::checkBox("cid[]",false,array("value"=>$data->id,"id"=>"cid_".$data->id,"disabled"=>$data->read?true:false))', 'type' => 'raw', 'htmlOptions' => array('style' => 'text-align:center', 'width' => '120px')), array('name' => 'timestamp', 'header' => Yii::t('notifications', 'Date & Time'), 'type' => 'raw', 'value' => '$data->timestampHR', 'htmlOptions' => array('style' => 'width:20%'), 'cssClassExpression' => "(\$data->read) ? '' : 'unread_txt'"), array('name' => 'description', 'header' => Yii::t('notifications', 'Object'), 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->description), $data->link)'))));
$this->endWidget();
?>
</div><!-- form -->
示例9: foreach
?>
</div>
<div class="col-md-9">
<?php
foreach ($attachments as $attachment) {
?>
<div>
<?php
echo CHtml::encode($attachment->file_name);
?>
<?php
echo CHtml::link(Yii::t('app', 'Удалить'), 'javascript:void(0);', array('onClick' => "deleteFile(this, {$attachment->id})"));
?>
</div>
<?php
echo Chtml::hiddenField("attachmentsForDel[{$attachment->id}]", '0');
?>
<?php
}
?>
</div>
</div>
<?php
}
?>
<div class="form-group">
<?php
echo Chtml::label('', '', array('class' => 'col-md-3 control-label'));
?>
<div class="col-md-9">
<?php
示例10: array
?>
<div id="widgetWrapperForm" style="display: inline-block; width: 39px; vertical-align: middle; margin-left: -8px;">
<?php
$this->widget('application.modules.admin.modules.user.widgets.UserSearchWidget', array('input_login' => 'filterusername'))->userSearch();
?>
</div>
<?php
}
?>
<?php
$form = $this->beginWidget('CActiveForm', array('enableAjaxValidation' => false, 'method' => 'POST', 'action' => $this->createUrl('index'), 'htmlOptions' => array('id' => 'filterform', 'class' => 'form-horizontal')));
?>
<?php
echo Chtml::hiddenField(FALSE, $sessionGuid, ['id' => 'sessionGuid']);
?>
<div class="form-body">
<div class="row">
<div class="col-md-12">
<h4 class="form-section"> <?php
echo Yii::t('app', 'Номер заказа');
?>
</h4>
<div class="form-group" style="margin-left: 0; margin-right: 0;">
<?php
echo CHtml::textField('filternumber', array_key_exists('filternumber', $filter) ? $filter['filternumber'] : (string) FALSE, ['class' => 'form-control input-inline input-large']);
?>
</div>
示例11: array
<?php
echo $options['title'];
?>
<span class="chatboxuser"><?php
echo $user;
?>
</span>
</div>
<div class="chatboxmain">
<div class="chatboxmess">
</div>
<div class="chatboxinput">
<?php
echo Chtml::hiddenField('username', $user);
?>
<?php
echo Chtml::TextField('chatboxmessage', '', array('class' => "chatboxmessage", ' size' => '20', 'maxlength' => '100'));
?>
<a href="#" class="chatboxsend">Send</a>
</div>
</div>
</div>
<div class="chatboxbtn <?php
echo $options['float'];
?>
" title="Open <?php
echo $options['title'];
?>
示例12: array
'success' =>'js:function(data){ $("#grillapracticas").html(data).show();$("#form2").show();$("#marcatodas").prop("checked",false);$("#rango").empty();}',
),
$htmlOptions = array(
'color' => TbHtml::BUTTON_COLOR_INFO,
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
'style'=>'float: right;margin-right: 157px;margin-top: -48px;',
)
);
echo TbHtml::checkBoxListControlGroup('idpractipo', false, CHtml::listData(Practipo::model()->findAll(array('order' => 'nombre')), 'idpractipo', 'nombre'),
array(
'label' =>TbHtml::labelTb( 'Filtrar por tipo', array('color' => TbHtml::LABEL_COLOR_WARNING, 'style' => 'padding: 5px ; margin:-2px;')),
'class'=>'tipopract',
));
echo Chtml::hiddenField('altanomenclador',true);
?>
<div id="grillapracticas">
</div>
<div id="form2" class="mt30 oculto">
<?php
// echo TbHtml::labelTb('Seleccionar Prácticas', array('color' => TbHtml::LABEL_COLOR_WARNING, 'style' => 'margin:20px 0 20px ;font-size:13px;padding:5px;'));
echo TbHtml::checkBox('marcatodas', '', array(
'label' => TbHtml::labelTb('Seleccionar todas las Prácticas', array('color' => TbHtml::LABEL_COLOR_INFO, 'style' => 'font-size:13px;padding:7px;margin-left: -17px;',)),
'style'=>'float:right;margin-right:420px',
示例13: array
<?php
Yii::app()->bootstrap->registerAssetCss('../select2/select2.css');
Yii::app()->bootstrap->registerAssetJs('../select2/select2.js');
Yii::app()->clientScript->registerScript('crud/variant/update', '$(".crud-form select").select2();');
?>
<?php
$this->widget('bootstrap.widgets.TbAlert', array('block' => true, 'fade' => true, 'closeText' => '×', 'events' => array(), 'htmlOptions' => array(), 'userComponentId' => 'user', 'alerts' => array('success' => array('closeText' => '×'), 'info', 'warning' => array('block' => false, 'closeText' => false), 'error' => array('block' => false, 'closeText' => false))));
?>
<div class="crud-form">
<?php
$action = Yii::app()->createUrl('//Customers/createAjax', array('ccmp_id' => $ccmp_id));
$form = $this->beginWidget('TbActiveForm', array('id' => 'customer-form', 'type' => 'inline', 'enableAjaxValidation' => false, 'htmlOptions' => array('onsubmit' => "return false;", 'onkeypress' => " if(event.keyCode == 13){ send(); } ")));
echo Chtml::hiddenField('ccmp_id', $ccmp_id);
echo $form->errorSummary($model4updateuser);
?>
<div class="control-group">
<div class='control-label'>
<?php
echo $form->labelEx($model4updateuser, 'username');
?>
</div>
<div class='controls'>
<?php
echo $form->textField($model4updateuser, 'username', array('size' => 200, 'maxlength' => 350));
echo $form->error($model4updateuser, 'username');
?>
<span class="help-block">