Welcome, Guest

validate + submit and go to next page
(1 viewing) (1) Guest

TOPIC: validate + submit and go to next page

validate + submit and go to next page 3 years, 8 months ago #611

I just try all possibilities

Need to make simple download page.
Download is available only if you fulfill and submit form.

How to make it ?

I have 2 page form
1. page have form + button submit
2. page have only download links

No idea how to validate+ submit+ go to next page
  • riventel
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: -1

Re:validate + submit and go to next page 3 years, 8 months ago #613

as example have a look at the SamplePizzaShop form. It heavily uses pages.
  • TheMuffinMan

Re:validate + submit and go to next page 3 years, 8 months ago #617

yeah - but just after page one submit I want e-mail already to be sent...
  • riventel
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: -1

Re:validate + submit and go to next page 3 years, 8 months ago #618

the you have to create a custom piece (little php code) that checks which page the form is on and this sends the mail then. the sample form checks the page too.
  • TheMuffinMan

Re:validate + submit and go to next page 3 years, 8 months ago #621

I try my best to make it myself but ...

I have 2 pages named form and download
Under submit button on first page form I made:
function ff_download_action(element, action)
{
    switch (action) {
        case 'click':
            error = ff_validation(ff_currentpage);
            if (error != '') {
                alert(error);
                ff_validationFocus();
            } else {
                   ff_switchpage(ff_getPageByName('download'));
                ff_submitForm();
            }
            break;
        default:;
    } // switch
} // ff_download_action


Result is strange -> after submit I see for some seconds download page and than auto back to form

How to remove this auto return... or maybe I'm thinking completly wrong ??
  • riventel
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: -1

Re:validate + submit and go to next page 3 years, 8 months ago #623

that might be the problem:
ff_submitForm();

u switch the page and then directly do a submit. if I dont understand it wrong.
  • TheMuffinMan
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.35 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany