Hi,
For a form I am creating, I need to pass an amount to a variable that I can pass on to the Paypal redirect.
I suppose I need to create that variable in a custum code section after the form but before the Paypal action. The amount depends on a selection people make in the form. I have a selectbox named 'product' that looks someting like this:
buy1=Education/Not for Profit 1-100 users
buy2=Education/Not for Profit 100-250 users
buy3=Education/Not for Profit 250-1000 users
buy4=Corporate 1-100 users
etc.
I suppose I need to create some 'if then' code to make this work like IF product=buy1 THEN amount = 100, IF product=buy2 THEN amount = 150 etc.
By searching on the forum I found some code that looks like this. Will this work? Do I have to put some code around it?
Can someone help me with the proper piece of code?
Thanks!
For a form I am creating, I need to pass an amount to a variable that I can pass on to the Paypal redirect.
I suppose I need to create that variable in a custum code section after the form but before the Paypal action. The amount depends on a selection people make in the form. I have a selectbox named 'product' that looks someting like this:
buy1=Education/Not for Profit 1-100 users
buy2=Education/Not for Profit 100-250 users
buy3=Education/Not for Profit 250-1000 users
buy4=Corporate 1-100 users
etc.
I suppose I need to create some 'if then' code to make this work like IF product=buy1 THEN amount = 100, IF product=buy2 THEN amount = 150 etc.
By searching on the forum I found some code that looks like this. Will this work? Do I have to put some code around it?
var amount= new Array();
amount["buy1"]=100;
amount["buy2"]=150;
amount["buy3"]=200;
Can someone help me with the proper piece of code?
Thanks!