private function setBudgetData() { if (isset($this->phkRequestData['budget_id']) && !isset($this->phkRequestData['budget_text'])) { App::import("Model", "Budget"); $budget = new Budget(); $result = $budget->find("first", array('conditions' => array('Budget.id' => $this->phkRequestData['budget_id']))); if (count($result)) { $this->phkRequestData['budget_id'] = $result['Budget']['id']; $this->phkRequestData['budget_text'] = $result['Budget']['title']; $this->phkRequestData['budget_status'] = $result['Budget']['budget_status_id']; $this->phkRequestData['condo_id'] = $result['Budget']['condo_id']; } } }
echo $form->field($model, 'number')->textInput(); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'date_accept')->textInput(); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'bill_no')->textInput(); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'budget_id')->dropdownList(ArrayHelper::map(Budget::find()->all(), 'id', 'name'), ['id' => 'ddl-province', 'prompt' => 'เลือกหมวดหมู่', 'required' => '']); ?> </div> </div> <div class="row"> <div class="col-md-3"> <?php echo $form->field($model, 'partner_id')->textInput(); ?> </div> <div class="col-md-3"> </div> <div class="col-md-3">