Highlighted

Submit Button Timing Issue

Participant ,
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
Adobe Community Professional
Correct answer by Dave_Watts | Adobe Community Professional

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

Views

474

Likes

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

Submit Button Timing Issue

Participant ,
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
Adobe Community Professional
Correct answer by Dave_Watts | Adobe Community Professional

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

Views

475

Likes

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
Aug 13, 2019 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Aug 13, 2019 0
LEGEND ,
Aug 13, 2019

Copy link to clipboard

Copied

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,

^ _ ^

Likes

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
Reply
Loading...
Aug 13, 2019 1