Form Validation display errors - 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 Validation display errors (/showthread.php?tid=22570) |
Form Validation display errors - El Forum - 09-14-2009 [eluser]learning_php[/eluser] Hi, I have been trying to mt form validation error to display in it own div tag but when the form in reloaded the error is underneath the input box. I added a basic stylesheet and none of that is on the reloaded page either. Any help would be most appreciated Controller Code: <?php View Code: <html> Model Code: php Form Validation display errors - El Forum - 09-14-2009 [eluser]Aken[/eluser] Without additional styling, your error's <div> will automatically show up underneath the input. If your CSS isn't showing up, it's likely because it has a wrong relative URL. Try using either an absolute URL with a beginning slash, which will start from your root directory, or CI's URL helper with the site_url() function. Code: // Absolute URL starting from root. I personally like the latter as if I need to move servers or anything, it makes portability easy. |