本文整理汇总了PHP中kartik\helpers\Html::endForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::endForm方法的具体用法?PHP Html::endForm怎么用?PHP Html::endForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\helpers\Html
的用法示例。
在下文中一共展示了Html::endForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if ($orderCode->isNewRecord) {
?>
<?php
$form = \kartik\form\ActiveForm::begin(['type' => \kartik\form\ActiveForm::TYPE_INLINE]);
?>
<?php
echo $form->errorSummary($orderCode);
?>
<?php
echo $form->field($orderCode, 'code');
?>
<?php
echo \kartik\helpers\Html::submitButton(Yii::t('app', 'Apply code'), ['class' => 'btn btn-success']);
?>
<?php
echo \kartik\helpers\Html::endForm();
?>
<?php
} else {
?>
<?php
echo Yii::t('app', 'Applied discount code:');
?>
<div class="applied-discount-code">
<?php
echo $orderCode->discountCode->code;
?>
</div>
<?php
}
?>
示例2:
echo Html::input('text', 'group-name', '', ['class' => 'form-control']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Require review'), 'group-require-review', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-require-review', false, ['class' => '']);
?>
</div>
</div>
<div class="form-group">
<?php
echo Html::label(Yii::t('app', 'Allow guest user to rate'), 'group-allow-guest', ['class' => 'col-md-2 control-label']);
?>
<div class="col-md-10"><?php
echo Html::checkbox('group-allow-guest', false, ['class' => '']);
?>
</div>
</div>
<?php
BackendWidget::end();
?>
</article>
</div>
</section>
<?php
echo Html::endForm();
示例3:
<?php
use kartik\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form kartik\helpers\Html */
$form = Html::beginForm();
?>
<div class="modal fade" id="publish-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<?php
echo Html::panel(['heading' => '<i class="fa fa-cloud-upload"></i> Daten publizieren', 'headingTitle' => true, 'body' => Html::checkbox('sendNotification', false, ['label' => 'Benachrichtigung an die Benutzer senden?']), 'footer' => " " . Html::button('Abbrechen', ['class' => 'btn btn-default btn-sm', 'data-dismiss' => 'modal']) . " " . Html::button('Daten jetzt publizieren', ['class' => 'btn btn-info btn-sm', 'data-dismiss' => 'modal'])]);
?>
</div>
</div>
<?php
Html::endForm();