Welcome Guest, Not a member yet? Register   Sign In
Simple question about displaying errors/messages
#1

[eluser]victorche[/eluser]
I know that it was discussed a lot, but anyway I can not find the best explanation for my case. CI has some kind of self included info/warning/error messages, but I need something different and easier. Here is my case:
Let's say I have a small comments form. Only input for name and textarea for comments.
I need... simply 2 types of messages. The first one for success, like "Thanks, your comment was added" and the second one will be an error like "Error, you should fill both of the fields".
I know how to check and validate the form. But I don't need a special success page like /comments/success

I just want after the form is submitted, the same page to be refreshed. Like redirect to the same page, e.g. /comments/ but this time with the message/error above. So the steps will be:
1. fill the form
2. submit
3. page refresh with error/message div
4. (not CI issue) the error/message box will become hidden after X seconds, thanks to jQuery :]

So how can I make this WITHOUT a special page like /comment/success ?


Messages In This Thread
Simple question about displaying errors/messages - by El Forum - 07-17-2010, 03:35 AM
Simple question about displaying errors/messages - by El Forum - 07-18-2010, 10:00 PM
Simple question about displaying errors/messages - by El Forum - 07-19-2010, 01:16 AM
Simple question about displaying errors/messages - by El Forum - 07-19-2010, 03:22 AM
Simple question about displaying errors/messages - by El Forum - 07-19-2010, 10:38 AM
Simple question about displaying errors/messages - by El Forum - 07-19-2010, 12:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB