[Webinar] Streamline your web hosting managementRegister Today


How can I retain form values after action goes to an external site?

Posted on 2010-03-24
Medium Priority
Last Modified: 2013-11-11
I am trying to setup a form where it uses an external site from Bank of America for payment but at the same time I want it to retain other values from the same form at time of submit so that it can be included in a message after success or failure of payment through the Bank of America site.  What way can I accomplish this?
Question by:accucom
  • 3
LVL 61

Expert Comment

ID: 28506932
I could not get what are you trying to do,
but you can use session...
or put all values into hidden variebles...
you can store them in cookies...
you can use database to store them...
LVL 22

Accepted Solution

remorina earned 2000 total points
ID: 28523393
If you're not using a dynamic script like PHP or ASP your best method would be using a JavaScript to store the form values in a Cookie and then you can read them back again

A sample script and example can be found here

Author Comment

ID: 28550083
I can actually use PHP or classic ASP if there are better ways of storing fields for later use.

@HainKurt: The form I have for submitting contains some fields that the Bank of America's gateway only cares about (ie. name, email) while we have other fields for our own information (ie. proprietary information for company purposes).  We want to go directly to the payment site then when it returns back to my site to either the success or failure page is where I want to incorporate the other fields in a message body of an email to be sent out.

@remorina: thanks for the link as I hope it can accomplish what we what unless there's a better alternative that I can work with.

Author Comment

ID: 28563959
Now that I got a chance to review the javascript form saver code, I believe this is what I want it to achieve as follows:

When the submit button gets pressed and is about to exit my site for the gateway, I want to perform a BODY onUnLoad where it saves all the fields in the form to a cookie to retrieve when the gateway returns to my site on either a confirmation success or failure page which is currently using classic ASP code to generate an email message containing my original form's information.  I believe what I need to do is when it hits the success or failure page, I need it to retrieve all the form values not to repopulate the form but to populate the message that gets sent when I use the sendmail feature.  The part I am trying to figure out is how in classic ASP can I retrieve my saved cookie values, or will I need to use Javascript to retrieve first or to directly use ASP for that or something to that effect.

Author Closing Comment

ID: 31706900
At least the code snippet accomplished what I asked for in the first place.  Not to figure out how classic ASP gets form values which I'll make hidden so it can finish the purpose.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question