Changing / Posting 2 variables from 1 select option?
Hello,
Here is my problem. I have 3 pieces of information I'm trying to pass through a form:
A product size
A product UPC
A product price
Example products:
10cm cable
UPC: #10100A
Price: $10.00
12cm cable
UPC: #12100A
Price: $13.00
I want users to be able to select the cable length they need from a drop down, and have the UPC and price automatically applied when the form gets posted.
Anyone know how to do this? I've only ever used it with one variable per select option.
Surely just supplying the UPC will be sufficient for your form script to retrieve the other information from the product database? I mean, it looks like the item with the different length has a different UPC as it's a pre-built cable, so that's the point of having a UPC.
If that's not the case, I think you'd need to have some javascript that runs on change of the drop-down which populates a couple of hidden form variables with the other values prior to posting the form.
Actually, there is no interaction with a database at all. This is strictly HTML with Paypal add-to-cart buttons. I'm able to change only 1 variable at a time based on drop-down selection. I was just wondering if it was possible to somehow change two without resorting to client-side JavaScript.
Bookmarks