當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TbHtml::beginForm方法代碼示例

本文整理匯總了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>
開發者ID:maxim-bondarenko,項目名稱:library,代碼行數:31,代碼來源:_libraryForm.php

示例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;
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:31,代碼來源:column2_home.php

示例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');
?>
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:31,代碼來源:login.php

示例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')))));
}
開發者ID:maxim-bondarenko,項目名稱:library,代碼行數:25,代碼來源:search.php


注:本文中的TbHtml::beginForm方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。