public function getProa() { //relation อำเภอไปจังหวัด return $this->hasOne(Provinces::className(), ['PROVINCE_ID' => 'PROVINCE_ID']); }
</div> <div class="col-xs-3 col-sm-3 col-md-3"> <?php echo $form->field($model, 'cid')->widget(\yii\widgets\MaskedInput::classname(), ['mask' => '9-9999-99999-99-9']); ?> </div> <div class="col-xs-6 col-sm-6 col-md-6"> <?php echo $form->field($model, 'address')->textarea(['row' => 3]); ?> </div> </div> <div class="row"> <div class="col-xs-3 col-sm-3 col-md-3"> <?php echo $form->field($model, 'chw')->widget(Select2::classname(), ['data' => ArrayHelper::map(app\models\Provinces::find()->all(), 'PROVINCE_ID', 'PROVINCE_NAME'), 'language' => 'th', 'options' => ['placeholder' => 'เลือกจังหวัด ...'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-xs-3 col-sm-3 col-md-3"> <?php echo $form->field($model, 'ampur')->widget(DepDrop::className(), ['data' => $amp, 'options' => ['placeholder' => '<--คลิกเลือกอำเภอ-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw'], 'url' => yii\helpers\Url::to(['/employees/get-amp']), 'loadingText' => 'กำลังค้นข้อมูล...']]); ?> </div> <div class="col-xs-3 col-sm-3 col-md-3"> <?php echo $form->field($model, 'tumbon')->widget(DepDrop::className(), ['data' => $tum, 'options' => ['placeholder' => '<--คลิกเลือกตำบล-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw', 'employees-ampur'], 'url' => yii\helpers\Url::to(['/employees/get-dist']), 'loadingText' => 'กำลังค้นข้อมูล...']]); ?> </div> <div class="col-xs-3 col-sm-3 col-md-3"> <?php echo $form->field($model, 'tel')->widget(\yii\widgets\MaskedInput::classname(), ['mask' => '999-999-9999']);
public function getProv() { return $this->hasOne(Provinces::className(), ['PROVINCE_ID' => 'chw']); }