<?php $data = ArrayHelper::map(\common\models\Pegawai::find()->asArray()->all(), 'nip', 'nama_cetak'); echo $form->field($result, 'nip_ppk')->widget(Select2::classname(), ['data' => $data, 'theme' => Select2::THEME_BOOTSTRAP, 'options' => ['placeholder' => 'Pilih Nama PPK'], 'pluginOptions' => ['allowClear' => true]])->label('Pilih Nama PPK'); ?> <?php $data = ArrayHelper::map(\common\models\Pegawai::find()->asArray()->all(), 'nip', 'nama_cetak'); echo $form->field($result, 'nip_bpp')->widget(Select2::classname(), ['data' => $data, 'theme' => Select2::THEME_BOOTSTRAP, 'options' => ['placeholder' => 'Pilih Nama BPP'], 'pluginOptions' => ['allowClear' => true]])->label('Pilih Nama BPP'); ?> <div id="kota2"> <?php $data = ArrayHelper::map(\backend\models\DafKota::find()->asArray()->all(), 'kab_id', 'nama'); echo $form->field($result, 'kota_tujuan')->widget(Select2::classname(), ['data' => $data, 'theme' => Select2::THEME_BOOTSTRAP, 'options' => ['placeholder' => 'Pilih Kota Tujuan'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php $data = ArrayHelper::map(\backend\models\DafPropinsi::find()->asArray()->all(), 'propinsi_id', 'nama'); echo $form->field($result, 'propinsi_id')->widget(Select2::classname(), ['data' => $data, 'theme' => Select2::THEME_BOOTSTRAP, 'options' => ['placeholder' => 'Pilih Kota Tujuan'], 'pluginOptions' => ['allowClear' => true]])->label('Propinsi Tujuan'); ?> </div> <?php echo $form->field($result, 'no_spd')->textInput(['readOnly' => true, 'require' => true, 'value' => str_pad($dat, 4, "0", STR_PAD_LEFT) . '/PERJADIN-DN/' . \common\components\MyHelper::Romawi(date('m')) . '/' . date('Y')])->label('No. SPD'); ?> <?php echo $form->field($result, 'no_reg')->textInput(['readOnly' => true, 'require' => true, 'value' => str_pad($dat, 4, "0", STR_PAD_LEFT) . '/SPPD-DN/BU/' . \common\components\MyHelper::Romawi(date('m')) . '/' . date('Y')])->label('No. Kwitansi'); ?> <?php echo $form->field($result, 'renc_tgl_selesai')->widget(DatePicker::classname(), ['options' => ['value' => $result['renc_tgl_selesai'], 'placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Sampai Keberangkatan'); ?> </div>
public function getProvinsi() { return $this->hasOne(\backend\models\DafPropinsi::className(), ['propinsi_id' => 'propinsi_id']); }