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


PHP Province::getDropdown方法代碼示例

本文整理匯總了PHP中Province::getDropdown方法的典型用法代碼示例。如果您正苦於以下問題:PHP Province::getDropdown方法的具體用法?PHP Province::getDropdown怎麽用?PHP Province::getDropdown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Province的用法示例。


在下文中一共展示了Province::getDropdown方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dirname

  <!-- hinh anh -->
  <?php 
require_once dirname(__FILE__) . './../jfileupload/_upload.php';
?>
  
  <div class="control-group">
    <div class="control-label"><?php 
echo $form->labelEx($model, 'scope');
?>
</div>
    <div class="controls">
	<?php 
$province = $model->isNewRecord ? '' : $model->district->parent->id;
$district = $model->isNewRecord ? '' : $model->district->id;
$provinces = new Province();
echo CHtml::dropDownList('ArticleOfArea[province]', $province, $provinces->getDropdown(), array('prompt' => 'Chọn tỉnh/thành', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('LoadDistricts'), 'update' => '#ArticleOfArea_scope', 'data' => array('province' => 'js:this.value', 'district' => $district))));
?>
    <?php 
echo CHtml::dropDownList('ArticleOfArea[scope]', '', array(), array('prompt' => 'Chọn quận/huyện'));
?>
    </div>
  </div>
  
  <div class="control-group">
    <div class="control-label"><?php 
echo $form->labelEx($model, 'summary');
?>
</div>
    <div class="controls"><?php 
echo $form->textArea($model, 'summary', array('class' => 'input-xxlarge', 'size' => 60, 'maxlength' => 500));
?>
開發者ID:phantsang,項目名稱:xzsUuJg0keDWW5Rx679PHBVBJ,代碼行數:31,代碼來源:_form.php

示例2: Province

?>
                            <?php 
echo $form->textField($model, 'price');
?>
                            <?php 
echo $form->error($model, 'price');
?>
                        </div>
                    
                       <div class="newrow">
                            <?php 
echo $form->labelEx($model, 'scope');
?>
                            <?php 
$provinces = new Province();
echo $form->dropDownList($model, 'scope', $provinces->getDropdown(), array('empty' => 'Toàn quốc'));
?>
                            <?php 
echo $form->error($model, 'scope');
?>
                        </div>
                    
                        <div class="newrow">
                            <?php 
echo $form->labelEx($model, 'category');
?>
                            <?php 
$adsCategories = new AdvertisingCategory();
echo $form->dropDownList($model, 'category', $adsCategories->getDropdown());
?>
                            <?php 
開發者ID:phantsang,項目名稱:xzsUuJg0keDWW5Rx679PHBVBJ,代碼行數:31,代碼來源:createAdvertising.php

示例3: array

                        <?php 
}
?>
                    </ul>
                </div>
                <div class="col-right">
                	<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'article-of-area-filter', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>
					<fieldset>
					  <legend>Lọc theo khu vực</legend>
                       <div class="newrow">
                            <label>Tỉnh/Thành phố</label>
                            <?php 
$province = new Province();
echo CHtml::dropDownList('Province', '', $province->getDropdown(), array('prompt' => 'Chọn tỉnh/thành phố', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('LoadDistricts'), 'update' => '#District', 'data' => array('province' => 'js:this.value'))));
?>
                        </div>
                        <div class="newrow">
                            <label>Quận/Huyện</label>
                            <?php 
echo CHtml::dropDownList('District', '', array(), array('prompt' => 'Chọn quận/huyện'));
?>
                        </div>
                        </fieldset>
                    
                        <div class="newrow buttonRow fright">
                            <?php 
echo CHtml::submitButton('Tìm kiếm', array('class' => 'button_send'));
?>
                        </div>
開發者ID:phantsang,項目名稱:xzsUuJg0keDWW5Rx679PHBVBJ,代碼行數:31,代碼來源:articleOfArea.php


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