Errors And Messages After Submit - 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: Errors And Messages After Submit (/showthread.php?tid=38105) |
Errors And Messages After Submit - El Forum - 01-30-2011 [eluser]victorche[/eluser] This was always something not very easy for me in CI. Every time an user submits a form, there could be an error (no success) or message(if everything went Ok). So there is some kind of error handling in CI, but I think it is only for php errors etc. I know there are some libraries out there and in fact I am using one of them now. But all this seems very complicated to me. I mean ... they have some configs, some things like "error_prefix", "error_suffix". I do not need these things. Besides, for example if I use ion_auth, there are other functions in this library for displaying errors and messages. That's why I want to have a simple solution (small library I guess), which will be used simply and everywhere through my code. And I don't need html tags in it. I will have: Code: <div id="message"><?php echo $message; ?></div> Well maybe they are needed if you need different styles for error and message. And if that is the case, then Ok. But anyway I think it can be done with a couple of simple functions. And my question is ... How this can be easily implemented in CI 2.0 ? Maybe there is something new in the code about it ? Or maybe someone knows a simple solution (like library) ? Errors And Messages After Submit - El Forum - 01-30-2011 [eluser]boxyee[/eluser] You could use form validation, which will help to output errors. User guide page: http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html |