Form errors not showing. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Form errors not showing. (/showthread.php?tid=41012) Pages:
1
2
|
Form errors not showing. - El Forum - 04-25-2011 [eluser]austintbiggs[/eluser] No matter what I do I can't seem to get the Ion Auth errors to display although I believe the issue lies in standard php and codeigniter. Anyone have ideas? in the controller Code: function login() within the view Code: <div id="infoMessage"><?php echo $message;?></div> Form errors not showing. - El Forum - 04-26-2011 [eluser]toopay[/eluser] Of course, because you don't use it! Code: <label class="fields"><strong>Username</strong></label> Form errors not showing. - El Forum - 04-26-2011 [eluser]austintbiggs[/eluser] But I am using it! See here: Code: ... else And here: Code: <div id="infoMessage"><?php echo $message;?></div> Form errors not showing. - El Forum - 04-26-2011 [eluser]toopay[/eluser] Code: $this->data['message'] = function_exists('validation_errors') AND validation_errors() ? validation_errors() : $this->session->flashdata('message'); Form errors not showing. - El Forum - 04-26-2011 [eluser]austintbiggs[/eluser] This doesn't seem to work, when I replace Code: $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message'); with Code: $this->data['message'] = ($this->form_validation->validation_errors()) ? $this->form_validation->validation_errors() : $this->session->flashdata('message'); I receive this error Quote:Fatal error: Call to undefined method CI_Form_validation::validation_errors() in /controllers/body.php on line 59 when examining the document, line 59 is Code: $this->data['message'] = ($this->form_validation->validation_errors()) ? $this->form_validation->validation_errors() : $this->session->flashdata('message'); Any ideas? Form errors not showing. - El Forum - 04-26-2011 [eluser]toopay[/eluser] Just test if the function exist Code: if(function_exists('validation_errors')) Form errors not showing. - El Forum - 04-26-2011 [eluser]austintbiggs[/eluser] I tried that and now I'm receiving the following error Quote:Fatal error: Call to undefined method CI_Form_validation::validation_errors() in /nfs/c07/h01/mnt/113668/domains/ravecity.tv/html/heart/controllers/body.php on line 61 Form errors not showing. - El Forum - 04-26-2011 [eluser]toopay[/eluser] Try the LAST code i gave. Form errors not showing. - El Forum - 04-26-2011 [eluser]Aken[/eluser] If I had to guess, you're probably have one of two problems: 1) Your ternary IF statement, when it checks (validation_errors()) is returning true even when it's empty (which could be possible even if there's just a single space in the string). 2) Your flash data is empty. I would var_dump() each of those items to see what sort of values they hold at various times, and go from there. Form errors not showing. - El Forum - 04-26-2011 [eluser]austintbiggs[/eluser] Oh, my bad I put that in the view for some reason, I pieced it in, but still nothing. no errors, but nothing gets printed. |