Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

How to display a messge after form submission


Reply


5 Posts   2863 Views

Avatar
mango

Community Member, 26 Posts

5 May 2009 at 5:36pm

I've followed tutorial 3 to build my form successfully, now how do I get it to display a thank you message after the form has been submitted?

Avatar
Nivanka

Community Member, 395 Posts

8 May 2009 at 3:28am

Create a new page called Thank you, and after performing the jobs you wish to do with the form use the Director to redirect the user to the thank you page you created.

Director::redirect("");

Avatar
mango

Community Member, 26 Posts

8 May 2009 at 5:31pm

Is there a way to get back to the original form page but this time with the added 'Thank You' message at the top of that page?

Avatar
Nivanka

Community Member, 395 Posts

8 May 2009 at 7:09pm

you can direct the user to the same page with the following

Director::redirectback();

and to add a custom message to the form just do this in you form processing page,

$form->addErrorMessage("Blurb", 'Page Saved Successfully', "good");

Avatar
mango

Community Member, 26 Posts

8 May 2009 at 9:31pm

Thanks for that, it all works well!!