• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 07: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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.