• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Submit Button Timing Issue

Participant ,
Aug 13, 2019 Aug 13, 2019

Copy link to clipboard

Copied

I have a web page where users submit a form and info is sent to a 3rd party vendor.

The issue I have is that it takes a few seconds for the process to complete and my users are hitting the submit button multiple times.

and its causing issues with multiple submissions to the 3rd party vendor.

QUESTION:

Is there a way to send the user to the next page as soon as they hit the submit button while the code processing takes place?

So they cant hit the submit button more than once

Like this

  1. Submit button
  2. Send the user to the next page
  3. Continue processing code with 3rd part vendor

Views

615

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 13, 2019 Aug 13, 2019

You could handle this a couple of ways. The more "traditional" way, I guess, is to disable the submit button via JS immediately after you trigger the long-running action. You'd probably have to do both with JS.

An alternative approach like what you're suggesting would involve the submission going to the next page immediately, then within that next page you could use CFTHREAD to process the long-running work separately, while presenting a message to the user that the work was in progress. So the n

...

Votes

Translate

Translate
Community Expert ,
Aug 13, 2019 Aug 13, 2019

Copy link to clipboard

Copied

You could handle this a couple of ways. The more "traditional" way, I guess, is to disable the submit button via JS immediately after you trigger the long-running action. You'd probably have to do both with JS.

An alternative approach like what you're suggesting would involve the submission going to the next page immediately, then within that next page you could use CFTHREAD to process the long-running work separately, while presenting a message to the user that the work was in progress. So the next page would load a lot faster as a result, but you'd have to figure out how you want to handle the callback from the long-running work.

Dave Watts, Eidolon LLC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 13, 2019 Aug 13, 2019

Copy link to clipboard

Copied

LATEST

Both of Dave's suggestions are the most common methods of preventing multiple form submits.  One of my favourite ways is to hide the submit button on submit and display in its place a spinning gif to indicate to the user that the process is working in the background.

V/r,

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation