本文整理汇总了PHP中kartik\widgets\DepDrop类的典型用法代码示例。如果您正苦于以下问题:PHP DepDrop类的具体用法?PHP DepDrop怎么用?PHP DepDrop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DepDrop类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Registrar</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
<?php
echo $form->field($model, 'id_departamento')->widget(Select2::classname(), ['data' => ArrayHelper::map(\app\models\Divipola::find()->all(), 'id_dpto', 'dpto'), 'options' => ['placeholder' => 'Seleccione una opción'], 'pluginOptions' => ['allowClear' => true]]);
?>
</div>
<div class="col-md-3">
<?php
echo $form->field($model, 'id_municipio')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'pluginOptions' => ['depends' => ['detalleproyecto-id_departamento'], 'loadingText' => 'Cargando...', 'placeholder' => 'Seleccione ciudad', 'url' => Url::to(['divipola/ciudades'])]]);
?>
</div>
<div class="col-md-3">
<?php
echo $form->field($model, 'latitud')->textInput();
?>
</div>
<div class="col-md-3">
<?php
echo $form->field($model, 'longitud')->textInput();
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
示例2:
<?php
echo $form->field($model, 'risk_ref_no')->textInput(['maxlength' => true]);
?>
<div class="col-sm-6 col-md-6">
<?php
echo $form->field($model, 'prohead')->dropdownList(ArrayHelper::map(Prohead::find()->all(), 'PROHEAD_ID', 'PROHEAD_NAME'), ['id' => 'ddl-prohead', 'prompt' => 'เลือกโปรแกรมความเสี่ยง']);
?>
</div>
<div class="col-sm-6 col-md-6">
<?php
echo $form->field($model, 'prodetail')->widget(DepDrop::classname(), ['options' => ['id' => 'ddl-prodetail'], 'data' => $prodetail, 'pluginOptions' => ['depends' => ['ddl-prohead'], 'placeholder' => 'เลือกหัวข้ออุบัติการณ์...', 'url' => Url::to(['/riskhead/get-prodetail'])]]);
?>
</div>
<div class="col-sm-6 col-md-6 col-md-6">
<?php
echo $form->field($model, 'program_text')->textInput(['maxlength' => true]);
?>
</div>
<div class="col-sm-6 col-md-6">
<?php
echo $form->field($model, 'risk_simple')->widget(Select2::classname(), ['data' => ArrayHelper::map(Simple::find()->all(), 'SIMPLE_ID', 'SIMPLE_NAME'), 'options' => ['placeholder' => 'เลือกหัวข้อตาม simple ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
示例3: date
<?php
$form = ActiveForm::begin(['id' => 'roInput', 'enableClientValidation' => true, 'method' => 'post', 'action' => ['/purchasing/request-order/simpanfirst']]);
?>
<?php
//= $form->errorSummary($model);
?>
<?php
echo $form->field($roDetail, 'CREATED_AT', ['template' => "{input}"])->hiddenInput(['value' => date('Y-m-d H:i:s'), 'readonly' => true]);
?>
<?php
echo $form->field($roDetail, 'KD_CORP')->dropDownList($userCorp, ['id' => 'rodetail-kd_corp', 'prompt' => ' -- Pilih Salah Satu --'])->label('Perusahaan');
echo $form->field($roDetail, 'KD_TYPE')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgType, 'options' => ['id' => 'rodetail-kd_type'], 'pluginOptions' => ['depends' => ['rodetail-kd_corp'], 'url' => Url::to(['/purchasing/sales-order/corp-type']), 'initialize' => true]])->label('Type');
echo $form->field($roDetail, 'KD_KATEGORI')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgKtg, 'options' => ['id' => 'rodetail-kd_kategori'], 'pluginOptions' => ['depends' => ['rodetail-kd_corp', 'rodetail-kd_type'], 'url' => Url::to(['/purchasing/sales-order/type-kat']), 'initialize' => true]]);
echo $form->field($roDetail, 'KD_BARANG')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $brgProdak, 'options' => ['id' => 'rodetail-kd_barang'], 'pluginOptions' => ['depends' => ['rodetail-kd_kategori'], 'url' => Url::to(['/purchasing/sales-order/brgkat']), 'initialize' => true]]);
echo $form->field($roDetail, 'NM_BARANG')->hiddenInput(['value' => ''])->label(false);
echo $form->field($roDetail, 'UNIT')->widget(Select2::classname(), ['data' => $brgUnit, 'options' => ['placeholder' => 'Pilih Unit Barang ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($roDetail, 'RQTY')->textInput(['maxlength' => true, 'placeholder' => 'Jumlah Barang']);
?>
<?php
echo $form->field($roDetail, 'NOTE')->textarea(array('rows' => 2, 'cols' => 5))->label('Informasi');
?>
<div class="form-group">
<?php
echo Html::submitButton($roDetail->isNewRecord ? 'Create' : 'Update', ['class' => $roDetail->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
示例4: JsExpression
$this->registerMetaTag(['property' => 'og:description', 'content' => $met_description]);
$this->registerMetaTag(['name' => 'description', 'content' => $met_description]);
$this->registerMetaTag(['name' => 'keywords', 'content' => $met_description]);
?>
<div class="row">
<div class="col-md-2">
<?php
$form = ActiveForm::begin(['id' => $searchModel->formName(), 'enableAjaxValidation' => false, 'enableClientValidation' => false, 'method' => 'get']);
?>
<?php
echo $form->field($searchModel, 'category_id')->widget(Select2::classname(), ['language' => Yii::$app->helper->getTwoCharLanguage(), 'size' => Select2::MEDIUM, 'options' => [], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 2, 'ajax' => ['url' => $categoriesListUrl, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')], 'initSelection' => new JsExpression($initCategoriesListScript)]]);
?>
<?php
echo $form->field($searchModel, 'country_id')->widget(Select2::className(), ['data' => ArrayHelper::map(Country::find()->asArray()->all(), 'id', 'name'), 'language' => Yii::$app->helper->getTwoCharLanguage(), 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'pluginOptions' => ['allowClear' => true]]);
echo $form->field($searchModel, 'province_id')->widget(DepDrop::classname(), ['data' => !$searchModel->country_id ? [] : ArrayHelper::map(Province::find()->where(['country_id' => $searchModel->country_id])->asArray()->all(), 'id', 'name'), 'type' => DepDrop::TYPE_SELECT2, 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'select2Options' => ['pluginOptions' => ['allowClear' => true], 'language' => Yii::$app->helper->getTwoCharLanguage()], 'pluginOptions' => ['depends' => ['search-country_id'], 'url' => Url::to(['/province/dep-list']), 'loadingText' => Yii::t('app', 'Loading...')]]);
echo $form->field($searchModel, 'city_id')->widget(DepDrop::classname(), ['data' => !$searchModel->province_id ? [] : ArrayHelper::map(City::find()->where(['province_id' => $searchModel->province_id])->asArray()->all(), 'id', 'name'), 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true], 'language' => Yii::$app->helper->getTwoCharLanguage()], 'pluginOptions' => ['depends' => ['search-province_id'], 'url' => Url::to(['/city/dep-list']), 'loadingText' => Yii::t('app', 'Loading...')]]);
?>
<?php
echo $form->field($searchModel, 'title')->textInput();
?>
<?php
echo $form->field($searchModel, 'address')->textInput();
?>
<?php
echo Html::hiddenInput('view', $adverView, ['id' => 'hiddenViewMode']);
?>
<div class="form-group">
<?php
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
?>
</div>
示例5: explode
<?php
$form = (include \Yii::getAlias("@nitm/views/layouts/form/header.php"));
?>
<?php
echo $form->field($model, 'action')->widget(Select2::className(), ['data' => $model->setting('actions'), 'theme' => Select2::THEME_KRAJEE, 'options' => ['id' => 'alert-action' . $uniqid, 'placeholder' => 'Alert me...', "allowClear" => true]])->label("Action");
?>
<?php
echo $form->field($model, 'remote_type')->widget(DepDrop::className(), ['value' => $model->remote_type, 'data' => [$model->remote_type => $model->properName($model->remote_type)], 'options' => ['placeholder' => ' select something ', 'id' => 'alert-type' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-action' . $uniqid], 'url' => Url::to(['/alerts/list/types']), 'loadingText' => '...', 'placeholder' => ' type of ']])->label("Remote Type");
?>
<?php
echo $form->field($model, 'remote_for')->widget(DepDrop::className(), ['value' => $model->remote_for, 'data' => [$model->remote_for => $model->properName($model->remote_for)], 'options' => ['placeholder' => ' for ', 'id' => 'alert-for' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-remote-type' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/for']), 'loadingText' => '...', 'placeholder' => ' and it\'s for a/an ']])->label("Remote For");
?>
<?php
echo $form->field($model, 'priority')->widget(DepDrop::className(), ['value' => $model->priority, 'data' => [$model->priority => $model->properName($model->priority)], 'options' => ['placeholder' => ' and it if has a priority of ', 'id' => 'priority' . $uniqid], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['id' => 'alert-priority' . $uniqid, 'pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['alert-type' . $uniqid], 'url' => Url::to(['/alerts/list/priority']), 'loadingText' => '...', 'placeholder' => ' and has a proiority of ']])->label("Priority");
?>
<?php
echo $form->field($model, 'methods')->widget(Select2::className(), ['value' => explode(',', $model->methods), 'options' => ['id' => 'alert-methods' . $uniqid, 'placeholder' => ' then alert me using'], 'data' => \nitm\helpers\alerts\DispatcherData::supportedMethods()])->label("Priority");
?>
<?php
if (!\Yii::$app->request->isAjax) {
?>
<div class="btn-group">
<?php
echo Html::submitButton(ucfirst($action), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
示例6: isset
}
?>
<div id="address" style="display: <?php
echo isset($viewId) ? 'block' : 'none';
?>
">
<?php
$form = \kartik\form\ActiveForm::begin();
/* @var \yincart\customer\models\CustomerAddress $model */
echo $form->field($model, 'province')->dropDownList($catList, ['id' => 'cat-id']);
// Child # 1
echo $form->field($model, 'city')->widget(DepDrop::classname(), ['data' => [$model->city => isset($model->cityArea) ? $model->cityArea->name : ''], 'options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/customer/get-cities'])]]);
// Child # 2
echo $form->field($model, 'district')->widget(DepDrop::classname(), ['data' => [$model->district => isset($model->districtArea) ? $model->districtArea->name : ''], 'pluginOptions' => ['depends' => ['cat-id', 'subcat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/customer/get-district'])]]);
?>
<?php
echo $form->field($model, 'address')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'zip_code')->textInput(['maxlength' => 255]);
?>
<?php
echo $form->field($model, 'phone')->textInput(['maxlength' => 255]);
?>
<?php
示例7: isset
echo isset($viewId) || $count == 0 ? 'block' : 'none';
?>
">
<?php
if (!isset($viewId)) {
$model = new DeliveryAddress();
}
$form = \yii\widgets\ActiveForm::begin(['requiredCssClass' => '', 'options' => ['class' => 'type_2'], 'fieldConfig' => ['labelOptions' => ['class' => 'required'], 'template' => "<div class=\"col-lg-2\">{label}</div><div class=\"col-lg-10\">{input}</div>\n<div class=\"col-lg-12\">{error}\n{hint}</div>"]]);
$select = ['' => '请选择...'];
$catList = $select + $catList;
/* @var \star\member\models\DeliveryAddress $model */
echo $form->field($model, 'province')->dropDownList($catList, ['id' => 'cat-id']);
// Child # 1
echo $form->field($model, 'city')->widget(DepDrop::classname(), ['data' => [$model->city => isset($model->cityArea) ? $model->cityArea->name : ''], 'options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => '请选择...', 'loadingText' => '载入中...', 'url' => Url::to(['/member/address/get-cities'])]]);
// Child # 2
echo $form->field($model, 'district')->widget(DepDrop::classname(), ['data' => [$model->district => isset($model->districtArea) ? $model->districtArea->name : ''], 'pluginOptions' => ['depends' => ['cat-id', 'subcat-id'], 'placeholder' => '请选择...', 'loadingText' => '载入中...', 'url' => Url::to(['/member/address/get-district'])]]);
?>
<?php
echo $form->field($model, 'address')->textInput(['maxlength' => 45]);
?>
<?php
echo $form->field($model, 'zip_code')->textInput(['maxlength' => 6]);
?>
<?php
echo $form->field($model, 'phone')->textInput(['maxlength' => 11]);
?>
<?php
示例8: isset
?>
</a></li>
</ul>
<br/>
<div class="tab-content">
<div id="main" class="tab-pane active">
<?php
echo $form->field($model, 'menu_type_id')->dropDownList(['' => Yii::t('gromver.platform', 'Select ...')] + \yii\helpers\ArrayHelper::map(\gromver\platform\common\models\MenuType::find()->all(), 'id', 'title'), ['id' => 'menu_type_id']);
?>
<?php
echo $form->field($model, 'language')->dropDownList(Yii::$app->getLanguagesList(), ['prompt' => Yii::t('gromver.platform', 'Select ...'), 'id' => 'language']);
?>
<?php
echo $form->field($model, 'parent_id')->widget(\kartik\widgets\DepDrop::className(), ['pluginOptions' => ['depends' => ['menu_type_id', 'language'], 'placeholder' => Yii::t('gromver.platform', 'Select ...'), 'url' => \yii\helpers\Url::to(['type-items', 'update_item_id' => $model->isNewRecord ? null : $model->id, 'selected' => $model->parent_id])]]);
?>
<?php
echo $form->field($model, 'title')->textInput(['maxlength' => 1024, 'placeholder' => isset($sourceModel) ? $sourceModel->title : null]);
?>
<?php
echo $form->field($model, 'alias')->textInput(['maxlength' => 255, 'placeholder' => Yii::t('gromver.platform', 'Auto-generate')]);
?>
<?php
echo $form->field($model, 'status')->dropDownList(['' => Yii::t('gromver.platform', 'Select ...')] + $model->statusLabels());
?>
<?php
示例9:
<div class="pembukuan-form">
<?php
$form = ActiveForm::begin(['id' => 'create-lap', 'enableClientValidation' => true]);
?>
<?php
echo $form->field($model, 'TGL')->textInput(['value' => $tglSkarang, 'readonly' => true])->label('Tanggal');
?>
<?php
echo $form->field($model, 'TYPE')->dropDownList($filterTypeNm, ['id' => 'pembukuan-type'])->label('Type Pembukuan');
?>
<?php
echo $form->field($model, 'CHILD')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $filterChildNm, 'options' => ['id' => 'pembukuan-child'], 'pluginOptions' => ['depends' => ['pembukuan-type'], 'url' => Url::to(['/dashboard/pembukuan-harian/ktg-type']), 'initialize' => true]])->label('Kategori Pembukuan');
?>
<?php
// $form->field($model, 'CHILD')->textInput(['maxlength' => true])->label('Kategori Pembukuan');
?>
<?php
//$form->field($model, 'SRC')->hiddenInput(['value'=>$idWarga,'maxlength' => true])->label(false);
?>
<?php
//$form->field($model, 'SRC_DSC_REF')->hiddenInput(['maxlength' => true])
?>
<?php
echo $form->field($model, 'SRC_DSC')->dropDownList($valSource, ['maxlength' => true]);
示例10:
<h2>@<?php
echo Html::encode($model->user->screen_name);
?>
</h2>
<p class="well well-sm"><?php
echo Html::encode($model->text);
?>
</p>
<?php
echo $form->field($model, 'contest_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Contest::find()->all(), 'id', 'name'), 'options' => ['placeholder' => 'Select a Contest ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($model, 'entry_id')->widget(DepDrop::classname(), ['data' => ArrayHelper::map(Entry::find()->where(['contest_id' => $model->contest_id])->all(), 'id', 'name'), 'options' => ['placeholder' => Yii::t('app', 'Select a Entry ...')], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['tweet-contest_id'], 'url' => Url::to(['/entry/contest-entries']), 'loadingText' => Yii::t('app', 'Loading Entries ...')]]);
?>
<?php
echo $form->field($model, 'rating')->textInput(['maxlength' => 4]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
示例11:
<div class="kategori-form">
<?php
$form = ActiveForm::begin(['id' => 'createkat', 'enableClientValidation' => true, 'type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['kategori/simpan']]);
?>
<?php
echo $form->field($model, 'PARENT')->dropDownList($valParent, ['id' => 'kategori-parent']);
?>
<?php
echo $form->field($model, 'CORP_ID')->dropDownList($userCorp, ['id' => 'kategori-kd_corp'])->label('Corporate');
?>
<?php
echo $form->field($model, 'KD_TYPE')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $typeBrg, 'options' => ['id' => 'kategori-kd_type'], 'pluginOptions' => ['depends' => ['kategori-parent', 'kategori-kd_corp'], 'url' => Url::to(['/master/kategori/ktg-type']), 'initialize' => true]]);
?>
<?php
echo $form->field($model, 'NM_KATEGORI')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'NOTE')->textarea(['rows' => 6]);
?>
<?php
echo $form->field($model, 'STATUS')->radioList(['1' => 'Aktif', '0' => 'Tidak Aktif']);
?>
<div class="form-group">
示例12:
echo $form->field($model, 'urls')->widget(Select2::classname(), ['data' => array_merge(["" => ""], app\models\Article::makeLink($model->langs)), 'options' => ['placeholder' => 'เลือกเนื้อหาเว็บไซต์ หรือ บทความ', 'class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]);
} else {
if ($type == 'links') {
echo $form->field($model, 'urls')->input('text', ['placeholder' => 'เช่น http://www.nongkhai.go.th']);
}
}
?>
<?php
echo $form->field($model, 'description')->textarea();
?>
</div>
<div class="col-sm-4">
<?php
echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 150px;']);
echo $form->field($model, 'type')->widget(Select2::classname(), ['data' => \app\models\TblMenutype::makeDropDown($model->langs), 'hideSearch' => true, 'options' => ['placeholder' => 'เลือก...', 'class' => 'form-control ', 'multiple' => false, 'style' => 'width: 98%;']]);
echo $form->field($model, 'parent_id')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => [$model->parent_id => ''], 'options' => ['style' => 'width: 98%;'], 'select2Options' => ['hideSearch' => true], 'pluginOptions' => ['depends' => [Html::getInputId($model, 'type')], 'placeholder' => 'เลือก...', 'url' => Url::to(["getsubmenu"]), 'initialize' => true]]);
?>
<?php
echo $form->field($model, 'published')->widget(SwitchInput::classname(), ['pluginOptions' => ['size' => 'normal'], 'inlineLabel' => false]);
?>
<?php
echo $form->field($model, 'target')->widget(SwitchInput::classname(), ['pluginOptions' => ['size' => 'normal', 'onText' => 'หน้าต่างใหม่', 'offText' => 'หน้าต่างเดิม'], 'inlineLabel' => false]);
?>
</div>
</div>
<?php
echo $form->field($model, 'id', ['options' => ['class' => 'sr-only']])->hiddenInput();
?>
<?php
示例13:
<?php
/**
* @author Niko Gasco
* @copyright 2015
*/
use kartik\widgets\DepDrop;
// Parent
echo $form->field($model, 'cat')->dropDownList($catList, ['id' => 'cat-id']);
// Child # 1
echo $form->field($model, 'subcat')->widget(DepDrop::classname(), ['options' => ['id' => 'subcat-id'], 'pluginOptions' => ['depends' => ['cat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/site/subcat'])]]);
// Child # 2
echo $form->field($model, 'prod')->widget(DepDrop::classname(), ['pluginOptions' => ['depends' => ['cat-id', 'subcat-id'], 'placeholder' => 'Select...', 'url' => Url::to(['/site/prod'])]]);
示例14:
$dropunit = ArrayHelper::map(Unitbarang::find()->all(), 'KD_UNIT', 'NM_UNIT');
$dropsup = ArrayHelper::map(Suplier::find()->all(), 'KD_SUPPLIER', 'NM_SUPPLIER');
?>
<div class="barang-form">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'id' => 'form-prodak-id', 'enableClientValidation' => true, 'options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'PARENT')->hiddenInput(['value' => 1, 'maxlength' => true])->label(false);
?>
<?php
echo $form->field($model, 'KD_CORP')->dropDownList($drop, ['id' => 'barang-kd_corp', 'readonly' => true])->label('Perusahaan');
echo $form->field($model, 'KD_TYPE')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $droptype, 'options' => ['id' => 'barang-kd_type'], 'pluginOptions' => ['depends' => ['barang-kd_corp'], 'url' => Url::to(['/dashboard/gsn-product/prodak-corp-type']), 'initialize' => true]]);
echo $form->field($model, 'KD_KATEGORI')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $dropkat, 'options' => ['id' => 'barang-kd_kategori'], 'pluginOptions' => ['depends' => ['barang-kd_corp', 'barang-kd_type'], 'url' => Url::to(['/dashboard/gsn-product/prodak-type-kat']), 'initialize' => true]]);
?>
<?php
echo $form->field($model, 'NM_BARANG')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'KD_UNIT')->widget(Select2::classname(), ['data' => $dropunit, 'options' => ['placeholder' => 'Pilih KD UNIT ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
echo $form->field($model, 'KD_SUPPLIER')->widget(Select2::classname(), ['data' => $dropsup, 'options' => ['placeholder' => 'Pilih Nama Supplier ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
<?php
/* $form->field($model, 'KD_DISTRIBUTOR')->widget(Select2::classname(), [
示例15:
/* @var $form yii\widgets\ActiveForm */
?>
<div class="draft-plan-form">
<?php
$form = ActiveForm::begin(['id' => $model->formName()]);
?>
<?php
echo $form->field($model, 'TGL')->widget(Select2::classname(), ['data' => $year, 'options' => ['placeholder' => 'Pilih Tahun ...'], 'pluginOptions' => ['allowClear' => true]])->label('YEAR');
?>
<?php
echo $form->field($model, 'CUST_ID')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'options' => ['placeholder' => 'Select ...'], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['draftplandetail-tgl'], 'initialize' => true, 'loadingText' => 'Loading ...', 'url' => Url::to(['/mastercrm/draft-plan/lis-ganti'])]])->label('Pilih Customers');
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Reschedule' : 'Reschedule', ['class' => $model->isNewRecord ? 'btn btn-primary' : 'btn btn-primary', 'data-confirm' => 'Anda yakin ingin Ganti Jadwal']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>