本文整理汇总了PHP中yii\bootstrap\Html::activeHiddenInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::activeHiddenInput方法的具体用法?PHP Html::activeHiddenInput怎么用?PHP Html::activeHiddenInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Html
的用法示例。
在下文中一共展示了Html::activeHiddenInput方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
}
?>
<div id="sc-payment-new" style="margin-top: 20px;<?php
if (is_null($model) && !empty($payments)) {
echo "display:none;";
}
?>
">
<?php
if (!isset($model) || is_null($model)) {
$model = new \app\models\CreditCardForm();
}
$form = ActiveForm::begin(['action' => Url::to(['shopcart/payment-save']), 'layout' => 'horizontal']);
echo Html::activeHiddenInput($model, 'profile_id');
echo Html::activeHiddenInput($model, 'payment_profile_id');
?>
<h3>2. <?php
echo Yii::t('app', 'Add New Payment Method');
?>
</h3>
<?php
echo $form->errorSummary([$model]);
?>
<div class="row">
<div class="col-sm-5">
<div style="margin-bottom: 4px;"><?php
echo Yii::t('app', 'Credit Card');
?>
</div>
示例2:
<?php
use hipanel\helpers\Url;
use yii\bootstrap\ActiveForm;
use yii\bootstrap\Html;
?>
<?php
$form = ActiveForm::begin(['id' => 'set-serial-form', 'action' => Url::toRoute('set-serial'), 'validationUrl' => Url::toRoute(['validate-form', 'scenario' => 'set-serial'])]);
?>
<?php
foreach ($models as $model) {
?>
<?php
echo Html::activeHiddenInput($model, "[{$model->id}]id");
?>
<div class="row">
<div class="col-md-6">
<?php
echo $form->field($model, "[{$model->id}]partno")->textInput(['disabled' => true]);
?>
</div>
<div class="col-md-6">
<?php
echo $form->field($model, "[{$model->id}]serial");
?>
</div>
</div>
<?php
}
示例3:
</div>
<div class="col-md-4">
<?php
echo $form->field($content, 'name', ['template' => '{input}'])->textInput(['data-toggle' => 'tooltip', 'title' => $sale->getAttributeLabel('name')]);
?>
</div>
<div class="col-md-2">
<?php
echo $form->field($content, 'description', ['template' => '{input}'])->textarea(['data-toggle' => 'tooltip', 'title' => $sale->getAttributeLabel('description')]);
?>
<?php
foreach ($image as $i) {
if (!empty($i->url)) {
echo Html::a(' <i class="glyphicon glyphicon-camera"></i> ', $i->url, ['target' => '_blank']);
}
echo Html::activeHiddenInput($i, '[' . $i->id . ']url', ['id' => false, 'class' => 'photo']);
}
?>
</div>
<div class="col-md-1">
<?php
echo $form->field($sale, 'covered', ['template' => '{input}'])->textInput(['data-toggle' => 'tooltip', 'title' => $sale->getAttributeLabel('covered')]);
?>
</div>
<div class="col-md-1">
<?php
echo $form->field($sale, 'bedroom', ['template' => '{input}'])->textInput(['data-toggle' => 'tooltip', 'title' => $sale->getAttributeLabel('bedroom')]);
?>
</div>
<div class="col-md-2">
<?php
示例4: time
?>
<?php
$form = ActiveForm::begin(['id' => 'dynamic-form-' . ($model->id ?: time()), 'action' => '@dns/record/' . $model->scenario, 'enableAjaxValidation' => true, 'options' => ['data-pjax' => true, 'data-pjaxPush' => false], 'validationUrl' => Url::toRoute(['@dns/record/validate-form', 'scenario' => $model->isNewRecord ? $model->scenario : 'update'])]);
?>
<div class="panel panel-default">
<div class="panel-body">
<div class="row record-item">
<?php
if ($id = $model->id) {
echo Html::activeHiddenInput($model, "[{$id}]id");
} else {
$id = 0;
}
echo Html::activeHiddenInput($model, "[{$id}]hdomain_id");
?>
<div class="col-lg-3 col-md-4">
<?php
echo $form->field($model, "[{$id}]name", ['template' => '
{label}
<div class="input-group">
{input}
<div class="input-group-addon">.' . $model->domain . '</div>
</div>
{hint}
{error}
', 'inputOptions' => ['data-attribute' => 'name']]);
?>
</div>
<div class="col-lg-2 col-md-2">
示例5:
?>
<?php
}
?>
</div>
<div class="col-md-2 text-right">
<div class="btn-group" role="group">
<button type="button" class="add-item btn btn-default"><i
class="glyphicon glyphicon-plus"></i></button>
<button type="button" class="remove-item btn btn-default"><i
class="glyphicon glyphicon-minus"></i></button>
</div>
</div>
</div>
<?php
echo Html::activeHiddenInput($nsModel, "[{$i}]domain_name", ['value' => $model->domain]);
?>
</div>
<?php
}
?>
</div>
<?php
DynamicFormWidget::end();
?>
</div>
</div>
</div>
</div>