Carrying variables over

lelias2k 30 May, 2009
Hello,

I have a ChronoForm where people fill out their shipping information. I would like the confirmation page to also have a button where they can print a shipping label from UPS. The button has to have a value similar to this:

http://98.129.208.203/ups/upsship.php?first=TESTING&last=TESDTINGTOO&address=1029+17TH+ST+NW&apt=-++&city=WASHINGTON&zip=20036&state=DC&phone=888-541-5586&c4g=903872


As you can see, the URL is automatically generated by adding the information users completed the form with. The URL points to a script which will automatically generate the label so people can print it.

Is there an easy way to carry over these variables with ChronoForms?

Thanks in advance!

Luciano
GreyHead 30 May, 2009
Hi lelias2K,

I'd build the URL in the OnSubmit Code and addd it to the Confirmation Page (I'm not sure if the Confirmation Plugin supports Extra Code but that would also do it).

Bob
lelias2k 30 May, 2009
You mean using OnSubmit to call a Javascript function that would build the URL?
GreyHead 30 May, 2009
Hi lelias2k,

Yes, but it would be PHP on the server side.

ob
lelias2k 30 May, 2009
Thanks Bob,

Do you have a quick code example just for me to get a quick start? I'll quit bugging you after that.🙂

Luciano
GreyHead 01 Jun, 2009
Hi lelias2k,

There's an example of a PayPal URL here

Bob
lelias2k 19 Jun, 2009
Hi Bob,

Correct me if I'm wrong, but if I use the code on the OnSubmit area, won't it automatically redirect the user to the page?

What I need is to create a button on the confirmation page that will then redirect the user to the UPS label. The reason I need it to be like this is because I want the confirmation page to have all the steps the user will need to follow, besides just printing the label.

So, in summary, I need the user o fill the form, and when he/she clicks submit, it will go to a confirmation page which will have a button (or simply a link) that will open a new window with the UPS label in it.

Will that be possible using the OnSubmit php function?

Thanks again,

Luciano
GreyHead 19 Jun, 2009
Hi Luciano,

You don't need to use the url to redirect - you can just add it a link that will open a new window. target='_blank' is the basic attribute from memory but you can Google all kinds of code to open popups or overlays.

Bob
This topic is locked and no more replies can be posted.