Hi,
I'm working on an order form and I have some scripting that I can't figure out how to make work. I need to be able to have a customer choose per item from 1-4 colors, enter a quantity, and then based on the number of colors chosen and the quantity ordered, have the form auto-populate with the correct price points (price points change based on the number of items ordered AND the number of colors). For example, they could choose:
1 color, less than 500 qty = price 1
1 color, between 500 and 1,000 qty = price 2
1 color more than 2500 qty = price 3
2 color, less than 500 qty = price 4
2 color, between 500 and 1000 qty = price 5
2 color more than 2500 = price 6
etc., etc. up to 4 colors. I can get the form to work when it's just 1 color using a script like this:
var v1 = +getField("qtyWhite_1").value; if (v1 < 500) event.value = 2.30;if (v1 >= 500 && v1 < 1000) event.value=2.25;if (v1 >= 2500) event.value = 2.20;
But I can't figure out how to make it work if the customer chooses 2, 3 or 4 colors of the same item and have that reflect in the unit price. Any advice? The fields I have to work with are "Quantity", "1 Color", "2 Color", "3 Color", "4 Color", "Unit Price", and "Total". Do I need rearrange the fields and/or combine the colors to make this work?
Thanks
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com