Hi I am new user adobeLiveDesigner I try to do order form and i need a help. Total column is a multiply of price and qty but for some products have to be multiply of price qty and size. Hope thats sound clear.Can anyone help me please.
Solved! Go to Solution.
Views
Replies
Total Likes
It sounds like you're going to have to use some clever logic to add that possibility. I would say something like this in the calculate event of the total box:
if (tfProductCode.rawValue == "widgits" || tfProductCode.rawValue == "gizmos || ... )
this.rawValue = this.parent.tfSize.rawValue * this.parent.tfQuantity.rawValue * this.parent.tfPrice.rawValue;
else this.rawValue = this.parent.tfQuantity.rawValue * this.parent.tfPrice.rawValue;
Or if your list of items that qualify is much longer, you can have a for loop fun through the list first and look for a matching value, then if it finds one, do the calculation.
Views
Replies
Total Likes
It sounds like you're going to have to use some clever logic to add that possibility. I would say something like this in the calculate event of the total box:
if (tfProductCode.rawValue == "widgits" || tfProductCode.rawValue == "gizmos || ... )
this.rawValue = this.parent.tfSize.rawValue * this.parent.tfQuantity.rawValue * this.parent.tfPrice.rawValue;
else this.rawValue = this.parent.tfQuantity.rawValue * this.parent.tfPrice.rawValue;
Or if your list of items that qualify is much longer, you can have a for loop fun through the list first and look for a matching value, then if it finds one, do the calculation.
Views
Replies
Total Likes
Euhmm... looks like you don't want to use JavaScript to do this... JavaScript is to interact with the form and the values...
and for maths you should be using FormCalc... you only need to write one line of code!!
Look out the FormCalc User Reference for help... everything is in there
Views
Replies
Total Likes