Welcome, Guest

Thank You page on Submit - Classic Mode
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Thank You page on Submit - Classic Mode

Thank You page on Submit - Classic Mode 1 year, 6 months ago #15051

When in classic mode, how do I redirect to a "Thank you" page after the validate and submit? The pizza example does this, but just cutting and pasting the custom script there isn't working (yes, I remembered to change the name of the page to the second page in my form.)

Is there a "piece" required or have I not got the custom script correct?
  • covumc
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0

Re: Thank You page on Submit - Classic Mode 1 year, 6 months ago #15095

Hi!

Please generate your own script in your submit-button!!! And then only paste this:

if (status != 0) {
alert(
"Sorry, but submission of you entries unfotunately failed.\n"+
"We will check this problem and hope on your understanding.\n"+
"You will be redirected to the home page now."
);
ff_returnHome();
} else
ff_switchpage(ff_getPageByName('pst_picture')); // thank you

Here just enter the name of the page like you already did.

greetings
matthias
  • goshmac
  • OFFLINE
  • Expert Boarder
  • Posts: 114
  • Karma: 5

Re: Thank You page on Submit - Classic Mode 1 year, 6 months ago #15105

Thanks for you reply.

Ok, Here is what I have:

In the "Submit Button" field, Script tab - Action - Library: ff_validate_submit.

When I click on the form name and go to Script tab - Submit - Custom I've pasted your code (which is basically the same code as the pizza example):

if (status != 0) {
alert(
"Sorry, but submission of you entries unfotunately failed.n"+
"We will check this problem and hope on your understanding.n"+
"You will be redirected to the home page now."
);
ff_returnHome();
} else
ff_switchpage(ff_getPageByName('fru_thankyou')); // thank you

My thank page is page 2 and the first field name = fru_thankyou. Is there a way to actually name the page?

I also tried changing ff_switchpage(ff_getPageByName('fru_thankyou')) to ff_switchpage(2), but that didn't work either.

The form is actually submitted successfully and an empty form is returned, but the thank you page is not displayed.

This is frustrating because I know I'm close. It's probably some small error somewhere.

Any help will be greatly appreciated!
  • covumc
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0

Re: Thank You page on Submit - Classic Mode 1 year, 6 months ago #15107

my fault

ok..in your form->Submit->Custom you have to first click on 'generate code' or something like that...should look like:

function ff_yourFormName_submitted(status)
{

} // some text here

Then paste the above mentioned code in this:

function ff_yourFormName_submitted(status)
{
if (status != 0) {
alert(
"Sorry, but submission of you entries unfotunately failed.n"+
"We will check this problem and hope on your understanding.n"+
"You will be redirected to the home page now."
);
ff_returnHome();
} else
ff_switchpage(ff_getPageByName('fru_thankyou')); // thank you
} // some text here

The function-part(function ff_yourFormName_submitted(status){...}) is very important!

If this is done and you couldn't get the thank you page, try to insert alert('testalert'); in this script to test if your script is fired when form is submitted

hope it helps!!

matthias
  • goshmac
  • OFFLINE
  • Expert Boarder
  • Posts: 114
  • Karma: 5

Re: Thank You page on Submit - Classic Mode 1 year, 6 months ago #15109

Perfect! Thanks!
  • covumc
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0

Re: Thank You page on Submit - Classic Mode 1 year, 5 months ago #16319

you are welcome
  • goshmac
  • OFFLINE
  • Expert Boarder
  • Posts: 114
  • Karma: 5
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.35 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany