Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculations in a form

Status
Not open for further replies.

lmoe

IS-IT--Management
Mar 1, 2004
168
US
In Acrobat 6, I created a form that looks like this:

QTY Total Item Description Price
123 Widget 14.95

QTY = form field qty1 and is formatted as a number.
Total = form field total1 and is formatted as a number.
Price = form field price1, and is read only

I am trying to calculate total1, to no avail.
Calculate "product(x)" qty1, price1 does not work
Calculate "custom script" qty1 * 14.95 does not work

What am I doing wrong?

LMC
IT/MIS
"Never stop learning.
 
Edit field Total1, go to the calculate tab. Select 'value is the' button, and change the drop down to product. You then have the option to select your other two fields as the multpliers, click ok to accept and this should work.

Alternatively set the following custom calculation script;
Code:
AFSimple_Calculate("PRD", new Array ("qty1", "price1"));

Ahhhhh, I see you have a machine that goes Bing!
 
I see my problem....the price 14.95 is just text on the screen. How do I tell Acrobat to make it part of the form field?

LMC
IT/MIS
"Never stop learning.
 
Got it...put in a default value for price1
Thanks.

LMC
IT/MIS
"Never stop learning.
 
I spoke too soon.
When I add qty2, total2 and price2 things go wrong.

qty1, total1 and price1 work okay.

qty2, total2 and price2 work as follows:
total2 is read only, calculate product(x) qty2, price2
price2 default is 47.95

However, a total 0 qty2 gives me a total2 of $2080.00, instead of the expected $47.95.
I have checked this multiple times to no avail.

Also, I can paste the custom script and say okay, but when I return to the properties I am back at the product(x) calculation.

LMC
IT/MIS
"Never stop learning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top