6 Replies Latest reply on Jun 2, 2013 5:26 PM by gkaiseril

PDF Calculations - Setting a Static Price

OS:  10.8.3

I am trying to construct a interactive PDF. This is the 2nd one I've ever made so I apologize for the dumb'ness of this question.

But I have a list down the center of the file listing the price of everything offered. Ill use round numbers for my example

500

400

350

350

200

...

etc

Basiclly there is a box next to each price where they can enter their QTY and I am trying to have it so the TOTAL adds it all up.

What I have done thus far is named all the boxes QTY down the list and made 2 rows hidden behind the price.

The fist row is set to Price. And this is where I get into my first question.What is the right way to set that cell to be = \$500.00 I am putting 500 in both the Options Tab in properties as the default value and also putting it in the calculations tab under custom calculations script.

In my second column I have the multiplication set up Price (x) QTY

Now whats weird is in the first row. It works fine. And the total shows up If I put 2 in the QTY box it =1000 and in the total box 1000 shows up

When I go to the 2nd box I hit 2 and I get like 16,000 and it goes nuts. Not sure where its getting those numbers from. I checked the cells tha tthe calculations are pointing to and they are correct. I meesed with the calculation order and that didnt do anything.

Any help would be appreciated.

One more thing! I have the total box linked to all the cells where the product (x) calculations are being made.

Thank You!

• 1. Re: PDF Calculations - Setting a Static Price

Moved to JavaScript

• 2. Re: PDF Calculations - Setting a Static Price

It's kind of difficult to understand what you did without seeing the file... Can you share it with us?

But generally speaking there's no need to use a calculation script for your hidden price fields. Just set their default value, reset the form and you're done. But I would actually do it differently. Make the price fields visible but read-only and remove the price text that you have there. That way you could easily update them if needed, and you won't have to start editing the actual contents of the file, just the form fields.

• 3. Re: PDF Calculations - Setting a Static Price

Here is a picture of the form as the user will see it.

Basically the boxes next to the price is where you add 1-2-3-4 etc for the QTY and in the total box at the bottom it adds them all up.

Here is the box in edit mode .      Text 193-194-195 is the set price box. I am not sure if I did this correctly. I have in options and in calculations both set to the price.

Text219-220-221 set as the math portion.   Example:  QtY12(x)Text194

My total at the bottom is set to the Sum of all the Text219-220-221 etc

The only row that works is the first one. All the rows under that dont even register properly. I add 2 to the QTY and I get like 16,000. I erase it and it goes to 32,000. I have to manually go in and reset them all back to zero.

• 4. Re: PDF Calculations - Setting a Static Price

First of all, use field names that make sense, not just Text1, Text2, etc. Also, make sure you match the names of fields that go together, so for example you should rename Text195 to "Extra Large Shower Chair Price" and Qty13 to "Extra Large Shower Chair Qty".

What I had suggested was that you move the price fiels to where there static prices are, and use them to show the prices to the user (set the fields as having a white background and as read-only to cover the text you have there now and make sure the user doesn't edit them).

Regarding the problem, it's hard to say what's going wrong without seeing the actual file, as I said. Sounds to me like some kind of wrong setting in the fields themselves. If you wish, you can send it to me at try6767@gmail.com and I'll have a look at it.

• 5. Re: PDF Calculations - Setting a Static Price

Ok thank you very much for your time! I just emailed it to you.

• 6. Re: PDF Calculations - Setting a Static Price

What you are describing sounds like the order that Acrobat/Reader is calculating the fields is wrong. Note this is not the name order nor the tab order.