Answered
Hi everyone, I've been searching this community for some guidance on a challenge I'm currently facing. I just couldn't find nor understand how to do this so your help would be appreciated.
I am trying to create code within the Custom Calculation Script in Acrobat 8 that would allow the following:
Price Per Roll:
1-11 = $10.95 12-35 = $9.65 36+=$9.30
I have a text field "Qty/Rolls" and then a Text Field for "Total"
I need to somehow create an if/then statement whereas, if someone types in a quantity of less than 12 - then it would be that quantity * $10.95
If someone types in a quantity that is between 12-35, then it would be that quantity * $9.65, etc.
Is this possible to do/create?
Thanks much.
event.value = ''; // clear field
// more than 0 rolls and less than 12 rolls
if (this.getField("Qty/Rolls").value > 0 & this.getField("Qty/Rolls").value < 12) {
event.value = 10.95 * this.getField("Qty/Rolls").value;
}
// more than 11 rolls and less than 35 rolls
if (this.getField("Qty/Rolls").value > 11 & this.getField("Qty/Rolls").value < 35) {
event.value = 9.95 * this.getField("Qty/Rolls").value;
}
// more than 34 rolls
if (this.getField("Qty/Rolls").value > 34) {
event.value = 9.30 * this.getField("Qty/Rolls").value;
}
The script could be simplified with field validation by not allowing an entry of less than zero rolls/
George Kaiser