<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>
当我按下上面的按钮时,我会填充与我当前使用的不同的表单
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,它是按钮旁边“Comp”表中的一个字段,当我按下按钮 Create NCN 时,它应该出现。
Comp 表中的 ncn_id 字段不记录
干杯