TOPIC:

Thank You page on Submit - Classic Mode 10 years 3 months ago #15051

  • Topic Author
  • covumc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
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?

Please Log in or Create an account to join the conversation.

Re: Thank You page on Submit - Classic Mode 10 years 3 months ago #15095

  • goshmac's Avatar
  • goshmac
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Karma: 5
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

Re: Thank You page on Submit - Classic Mode 10 years 3 months ago #15105

  • Topic Author
  • covumc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
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!

Please Log in or Create an account to join the conversation.

Re: Thank You page on Submit - Classic Mode 10 years 3 months ago #15107

  • goshmac's Avatar
  • goshmac
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Karma: 5
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

Re: Thank You page on Submit - Classic Mode 10 years 3 months ago #15109

  • Topic Author
  • covumc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Perfect! Thanks!

Please Log in or Create an account to join the conversation.

Re: Thank You page on Submit - Classic Mode 10 years 3 months ago #16319

  • goshmac's Avatar
  • goshmac
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 113
  • Karma: 5
  • Thanks: 0
you are welcome :)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.050 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!