If/then box script help in the form of Adobe Acrobat...

If having a purchase order that has two different fields of price (regular price per point & subscription price per article for each line item, then a quantity) and then a total field. Finally, there is a checkbox on the form indicating if they sign up for a monthly subscription.

What I try to do is create a script that totals each line by the current price multiplied by the quantity or the price of the subscription by amount if the subscription checkbox is checked ("Yes"). So far, I've tried several scripts, I found in the forum but no luck at all.

The box is near the billing fields down, so all the line items first appear in the upper part of the form. Thus, an individual if each line and calculations would amount in total to each line (reg * qty price) when you get off of the form... When you check the subscription all line totals would have changed to reflect the subscription rates on each line (which may be different). Just need help with a single line and I can duplicate for each line...

Here's what I does NOT again...:

 (function () {


if (this.getField("sub").value==="Yes") {
     var b1 = this.getField("Price1b");
     var c1 = this.getField("Qty1");
     var d1 = this.getField("Price1");
     event.value = b1.value * c1.value;
} else event.value = d1.value * c1.value;
    }


)();

Try this:

(function () {}

var b1 = getField("Price1b").value;

var c1 = getField("Qty1").value;

var d1 = getField("Price1").value;

If (getField("sub").value = 'Yes') {}

Event.Value = b1 * c1;

} else {}

Event.Value = d1 * c1;

}

})();

Tags: Acrobat

Similar Questions

Maybe you are looking for