Welcome Guest, Not a member yet? Register   Sign In
form upload + form validation
#1

[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 .......




Theme © iAndrew 2016 - Forum software by © MyBB