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, 9 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, 9 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: 113
  • Karma: 5

Re: Thank You page on Submit - Classic Mode 1 year, 9 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, 9 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: 113
  • Karma: 5

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

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

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

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

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint