Welcome Guest, Not a member yet? Register   Sign In
form validation no loading page view required
#1

Hi Everyone,

in my form validation, i don't want to load the whole html page, to trigger error, but i do not have idea how to do.

Code:
    if($this->form_validation->run() == false)
        {                            
        echo form_error('dblone_bc');
            }

 code above is work well, but when i convert the form_error('dblone_bc'); into variable so that i can pass the data into view but sad to say everything not work.   

please advise..
Reply
#2

(11-18-2016, 06:28 PM)jaysondotp Wrote: Hi Everyone,

in my form validation, i don't want to load the whole html page, to trigger error, but i do not have idea how to do.

Code:
if($this->form_validation->run() == false)
   {
echo form_error('dblone_bc');
           }

 code above is work well, but when i convert the form_error('dblone_bc'); into variable so that i can pass the data into view but sad to say everything not work.   

please advise..
How about:

Code:
$data['form_error'] = form_error('dblone_bc');

form_error return a string
Reply




Theme © iAndrew 2016 - Forum software by © MyBB