当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::beginForm方法代码示例

本文整理汇总了PHP中kartik\helpers\Html::beginForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::beginForm方法的具体用法?PHP Html::beginForm怎么用?PHP Html::beginForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\helpers\Html的用法示例。


在下文中一共展示了Html::beginForm方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

//print_r($customer);
?>

<div class="col-lg-12">
    <div class="box box-primary direct-chat direct-chat-primary">
        <div class="box-header with-border">
            <h3 class="box-title">Simple Chat</h3>
        </div>
        <div class="box-body">
            <div class="direct-chat-messages" id="message-container">
					<!-- <div id="notification" ></div> -->
            </div>
        </div>
        <div class="box-footer">
            <?php 
echo Html::beginForm(['/widget/chat/send-chat'], 'POST', ['id' => 'chat-form']);
?>
            <div class="input-group">
               <?php 
echo Html::textInput('message', null, ['id' => 'message-field', 'class' => 'form-control', 'placeholder' => 'Message', 'required' => true]);
?>
                <span class="input-group-btn">
                    <?php 
echo Html::submitButton('Send', ['class' => 'btn btn-primary btn-flat']);
?>
                </span>
            </div>
        </div>
    </div>
</div>
开发者ID:adem-team,项目名称:advanced,代码行数:30,代码来源:index.php

示例2:

?>
<div class="form-group no-margin">
    <?php 
echo Html::a(Icon::show('arrow-circle-left') . Yii::t('app', 'Back'), Yii::$app->request->get('returnUrl', ['index']), ['class' => 'btn btn-danger']);
?>

    <?php 
echo Html::submitButton(Icon::show('save') . Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'name' => 'action', 'value' => 'save']);
?>
</div>
<?php 
$this->endBlock('submit');
?>

<?php 
echo Html::beginForm(Yii::$app->request->url, 'post', ['class' => 'form-horizontal']);
?>
<section id="widget-grid">
    <div class="row">
        <article class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
            <?php 
BackendWidget::begin(['title' => Yii::t('app', 'Common'), 'icon' => 'pencil', 'footer' => $this->blocks['submit']]);
?>
            <div class="form-group required">
                <?php 
echo Html::label(Yii::t('app', 'Group name'), 'group-name', ['class' => 'col-md-2 control-label']);
?>
                <div class="col-md-10"><?php 
echo Html::input('text', 'group-name', '', ['class' => 'form-control']);
?>
</div>
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:group-create.php

示例3:

    ?>
				<?php 
    echo Html::input('hidden', 'controllerActionFileGenName[]', "{ACTIONGENFILE}");
    ?>
    			</div>
    			<div class="col-md-5 text-right">
				<?php 
    echo Html::button('Remove', ['class' => 'btn btn-danger removeAction']);
    ?>
    			</div>
    		    </div>
    		</div>
    	    </div>
    	</div>
	    <?php 
    echo Html::beginForm();
    ?>
    	<hr/>


    	<div class="panel panel-default">
    	    <div class="panel-heading">Controllers:</div>
    	    <div class="panel-body">
    		<div class="row Controllers">
    		    <div class="col-md-4 ControllerList" data-id="0">
    			<div class="panel panel-default">
    			    <div class="panel-body">
				    <?php 
    echo Html::label('Controller Name:');
    ?>
				    <?php 
开发者ID:serhatozles,项目名称:yii2-htmltemplateintegrator,代码行数:31,代码来源:controller.php

示例4:

<?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>&nbsp;Daten publizieren', 'headingTitle' => true, 'body' => Html::checkbox('sendNotification', false, ['label' => 'Benachrichtigung an die Benutzer senden?']), 'footer' => "&nbsp;" . Html::button('Abbrechen', ['class' => 'btn btn-default btn-sm', 'data-dismiss' => 'modal']) . "&nbsp;" . Html::button('Daten jetzt publizieren', ['class' => 'btn btn-info btn-sm', 'data-dismiss' => 'modal'])]);
?>
	</div>
</div>
<?php 
Html::endForm();
开发者ID:KasselR,项目名称:yii2-kr,代码行数:17,代码来源:_publishModal.php

示例5: implode

            echo Html::tag('ul', implode("\n", $selects), ['class' => 'property property-' . $property_id]);
        }
    }
    ?>
                </li>
            </ul>
        <?php 
}
?>
    </div>
    <?php 
if ($render_dynamic === true) {
    ?>
    <div class="filter-widget filter-dynamic">
        <?php 
    echo Html::beginForm('', 'get', ['class' => 'filter-form']);
    ?>
            <?php 
    foreach ($possible_selections as $group_id => $item) {
        ?>
                <?php 
        /** @var \app\models\PropertyGroup $group */
        $group = $item['group'];
        ?>
                <div class="filter-group">
                    <?php 
        if ($group->hidden_group_title == "0") {
            ?>
                        <div class="title">
                            <?php 
            echo Html::encode($group->name);
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:filterWidget.php

示例6: function

<?php

use yii\widgets\Pjax;
use kartik\helpers\Html;
use yii\helpers\ArrayHelper;
Pjax::begin(['id' => 'answer-poll', 'timeout' => 5000]);
if (empty($answerPoll)) {
    if (isset($alertMessage) && $alertMessage != '') {
        echo $alertMessage;
    }
    echo Html::beginForm(['/'], 'post', ['data-pjax' => '1', 'class' => '']);
    echo Html::radioList('answer_id', $answersData[0]->id, ArrayHelper::map($answersData, 'id', 'answer'), ['item' => function ($index, $label, $name, $checked, $value) {
        return Html::tag('div', Html::radio($name, $checked, ['value' => $value, 'label' => Html::encode($label)]), ['class' => 'radio']);
    }]);
    echo Html::input('hidden', 'question_id', $questions['id']);
    echo Html::submitButton('Голосовать', ['class' => 'btn btn-sm btn-primary', 'name' => 'hash-button']);
    echo Html::endForm();
} else {
    $sumOfVoices = 0;
    foreach ($answersData as $item) {
        $sumOfVoices = $sumOfVoices + $item->how_many;
    }
    for ($i = 0; $i < count($answersData); $i++) {
        $voicesPer = 0;
        if ($sumOfVoices == 0) {
            $voicesPer = 0;
        } else {
            $voicesPer = round($answersData[$i]->how_many / $sumOfVoices, 4) * 100;
        }
        ?>
        <div class="poll-option-block">
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:_poll.php

示例7:

use kartik\helpers\Html;
$this->title = Yii::t('app', 'Error Monitor');
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<div class="row">

    <?php 
$this->beginBlock('search-form');
?>
    <?php 
echo Html::beginForm('search', 'get', ['id' => 'code_sorter', 'class' => 'form-inline', 'role' => 'form']);
?>
    <?php 
echo Html::label('HTTP code: ', 'code');
?>
    <?php 
echo Html::input('text', 'ErrorMonitor[http_code]', null, ['class' => 'form-control']);
?>
    <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
    <?php 
echo Html::endForm();
?>
    <?php 
$this->endBlock();
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:index.php


注:本文中的kartik\helpers\Html::beginForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。