echo form_hidden('idCpf', $objeto->cpf_id); echo form_hidden('idRg', $objeto->rg_id);
if($this->input->post('stCPF') != '') { $cpf = new Documento(); $cpf->where('id', $this->input->post('idCpf'))->get(); $cpf->stNumero = $this->input->post('stRG'); $cpf->save(); $obj->save($cpf, 'cpf'); } if($this->input->post('stRG') != '') { $rg = new Documento(); $rg->where('id', $this->input->post('idRg'))->get(); $rg->stNumero = $this->input->post('stRG'); $rg->save(); $obj->save($rg, 'rg'); }