protected function _before_insert() { if (!$_POST['head_id']) { unset($_POST['head_id']); } else { $_POST['head_id'] = process_with_item_select_ids('head_id'); } }
public function _before_insert() { $_POST['sale_opportunities_id'] = process_with_item_select_ids('sale_opportunities_id'); $_POST['head_id'] = process_with_item_select_ids('head_id'); }
protected function _before_update() { if (I('post.head_id')) { $_POST['head_id'] = process_with_item_select_ids('head_id'); } }