0
<div class="colx2-left align-center">
<?php echo Form::button('create-ncn', 'Create NCN', array('class' => 'small-button', 'id' => 'create-ncn', 'type' => 'button', 'value' => 'create-ncn')) ?>
</div>
當我按下按鈕上我填充以不同的形式在一個目前我在以Id出現時,按下按鈕
public function action_create_yimyan()
{
$this->template = NULL;
$this->auto_render = FALSE;
$id = $this->request->param('id');
$comp = ORM::factory('Comp', $id);
$comp->ncn_id = $ncn->id;
$ncn = ORM::factory('NCN');
$ncn->user_id = Auth::instance()->get_user()->id;
$ncn->actionee_id = NULL;
$ncn->ncn_problem_type_id = 6;
$ncn->status_id = Status::lookup('In Progress', 'ncn');
$ncn->department_id = Auth::instance()->get_user()->department_id;
$ncn->title = $comp->description;
$ncn->customer = $comp->customer;
$ncn->dt_logged = time();
$ncn->save();
}
我想呼應ncn_id的id,這將是一個在按鈕,它應該出現旁邊的「比較」表中的字段,當我按下按鈕創建NCN。
在比較表中的ncn_id場不記錄
乾杯