![]() |
form upload + form validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: form upload + form validation (/showthread.php?tid=13511) |
form upload + form validation - El Forum - 11-25-2008 [eluser]soupdragon[/eluser] I'm need help :-) Let’s say i have a form_input and a form_upload component . I can happily validate the form input but how do i work it then, when thats okay i should do the upload with validation ? In fact how can i tell if i have an upload - before i go to the next part How can I do the verification for both components together ?? At the moment if ($this->form_validation->run('newshop') == FALSE) { $this->load->view('container', $data); } else { // validated so do the upload $upload = $this->do_upload('newshop'); if(isset($upload['error'])) { // THIS DOES NOT WORK $this->form_validation->set_message('logo', $upload['error']); $this->load->view('container', $data); } this does do the upload and i can also in the controller echo out the errors but i cant somehow show them on my form ....... |