本文整理汇总了PHP中TbHtml::beginForm方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::beginForm方法的具体用法?PHP TbHtml::beginForm怎么用?PHP TbHtml::beginForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::beginForm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<div class="form">
<?php
echo TbHtml::beginForm($request_url, 'post', array('enctype' => 'multipart/form-data'));
?>
<div class="form-group has-success clearfix">
<div class="wr col-sm-6">
<?php
echo TbHtml::dropDownList('reader_list', 'id', $reader_list, array('empty' => 'Выберите Пользователя', 'required' => 'true', 'options' => array(isset($reader_id_checked) ? $reader_id_checked : '' => array('selected' => true))));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::dropDownList('books_list', 'id', $books_list, array('empty' => 'Выберите Книгу', 'required' => 'true', 'options' => array(isset($book_id_checked) ? $book_id_checked : '' => array('selected' => true))));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::activeTextField($model, 'count_books', array('placeholder' => 'Количество', 'required' => true, 'pattern' => '[0-9]{1,2}', 'value' => isset($count) ? $count : ''));
?>
</div>
</div>
<div>
<?php
echo TbHtml::submitButton('Выдать', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
echo TbHtml::endForm();
?>
</div>
示例2: array
<a href="<?php
echo $col1->link;
?>
" class="column_ad"><img src="<?php
echo Yii::app()->request->baseUrl . $col1->images[0]->source;
?>
" title="<?php
echo $col1->title;
?>
"/></a>
<?php
}
?>
<div class="newsletter">
<?php
echo TbHtml::beginForm(array('site/newsletter'), 'post');
?>
<?php
echo TbHtml::TextField('email', 'Enter your Email here', array('class' => 'nl_input'));
?>
<input type="submit" class="nl_submit" value=""/>
<div class="clear"></div>
<?php
echo TbHtml::endForm();
?>
</div>
<?php
if (!empty($col2)) {
?>
<a href="<?php
echo $col1->link;
示例3:
<?php
echo Yii::app()->user->getFlash('activateMessage');
?>
</div>
<?php
}
?>
<p><?php
echo UserModule::t("Please fill out the following form with your login credentials:");
?>
</p>
<div class="well">
<?php
echo TbHtml::beginForm();
?>
<p class="note"><?php
echo UserModule::t('Fields withs <span class="required">*</span> are required.');
?>
</p>
<?php
echo TbHtml::errorSummary($model);
?>
<div class="form-control input-lg" style="width: 45%;">
<?php
echo TbHtml::activeLabelEx($model, 'username');
?>
示例4: array
<div class="form">
<?php
echo TbHtml::beginForm(Yii::app()->createUrl('/library/search/search'), 'post', array('enctype' => 'multipart/form-data'));
?>
<div class="form-group has-success clearfix">
<div class="wr col-sm-6">
<?php
echo TbHtml::TextField('search_field', "", array('placeholder' => 'Введите фразу для поиска', 'required' => 'true'));
?>
</div>
<div>
<?php
echo TbHtml::submitButton('Выдать', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
echo TbHtml::endForm();
?>
</div>
</div>
<?php
if (isset($result)) {
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $result, 'template' => "{items}", 'columns' => array(array('name' => 'name', 'header' => 'Название книги', 'htmlOptions' => array('color' => 'width: 60px')))));
}