These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculating quantities of items ordered times price per unit

tomt491
Registered: Nov 19 2008
Posts: 23
Answered

I'm very new to Acrobat 5. I've created a merchandise for sale form that allows people to enter the number of shirts they wish to order. I have four frames where they can enter the number of S, M, L and XL shirts. I am having trouble getting the Calculate function to work correctly. I have a price printed on the PDF of $23 per shirt. I wish to be able to total up all the quantities ordered, multiply them by $23 and have that number automatically enter in a frame I've created for the Total.

Any help anyone can offer would be greatly appreciated.

Thanks in advance,
Tomt491

Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Consider creating some hidden field that contains (same) values that are printed on the PDF to allow field calculation.

Here is a (bi-lingual) sample to download : [url]http://abracadabrapdf.net/file/forms/BonCommande.pdf[/url]

Password to unlock this form is "helenripley"

;-)
tomt491
Registered: Nov 19 2008
Posts: 23
Hello Merlin,

Thanks for your response.

I went to your PDF and saw how it worked. That's exactly what I've been trying to do. You did use a different layout to your form than I am using which may be my other option.

I've did try creating a hidden field called "Polo Shirt total" which was the sum of the quantities for the various size shirts. I also created a hidden field and entered the figure, $23.00, directly under the block that contained the price of the shirts. I did not want people to be able to access that field and change the price.

The final field in the row was named Total Polo Shirts and had the calculation formula set to be the product of the Polo Shirt Total x $23.00.

However, the total polo shirts total didn't work out correctly. I'll try again with your suggestion to see what happens.

If I set the calculation formula only read one of the shirt sizes, s,m,l,xl, and the hidden price, the final total frame worked correctly every time. However, when I added the other shirt sizes to the formula, the final total frame remained at $0.00 every time.

Thanks for your help.
TomT491
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Did you check the "calculation order" ?
tomt491
Registered: Nov 19 2008
Posts: 23
Merlin,

By Calculation Order do you mean Tab Order? I have the four frames where quantity entries are to be made as Tabs 1 thru 4. The frame where I want that quantity total to be entered is the hidden one, which is Tab 5. The frame where I have the price per shirt entered is Tab 6 and the frame where the total amount for all the shirt ordered is tab 7.

All of these are on a single horizontal line with the quantities on the left and price and grand total on the right.

One thing I tried and it seemed to work for a while was when I entered quantity amounts in each field. When I hit Enter, the grand total appeared as expected. However, when I went back and changed some of the quantity amounts, the Grand Total and hit enter it either increased or stayed the same. When I went back to the quantity fields and deleted all the amounts, the grand total field went back to $23.00.

It's very confusing.

tomt491
tomt491
Registered: Nov 19 2008
Posts: 23
Merlin,

I created a slightly different form using some of the features you used in your PDF. Here's a URL to the PDF.

http://cid-574cab0dff9f00f2.skydrive.live.com/browse.aspx/Acrobat%205%20Questions

Click on the file: conventionmerchandisesmallpolo to see the form.

My main question now is how to hide the fields that have the $23.00 in them. They are masking out the $23.00 figure that I included in the original PDF. If I make them as Hidden fields, the calculations don't work.

Do you have any suggestions as to how to make this form work without allowing the viewers to see the blue colored $23.00 entry?

Thanks for your help.

Tomt491
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
> If I make them as Hidden fields, the calculations don't work.That's unusual, as in not normal. Your form works fine for me when I made the price fields hidden, as I would expect. What is the exact version of Acrobat you're using (e.g., 5.0, 5.05, 5.1)?

George
tomt491
Registered: Nov 19 2008
Posts: 23
Hello George,

I'm using Acrobat 5. I just purchased it a few days ago from Amazon.com. It's used, but in like new condition. The case label says Ver 5.0, but the actual CD has a small 5.05 directly below the Acrobat 5.0 heading.

I just tried reading the PDF with hidden fields in Acrobat Reader Ver 7 and the calculations did not work.

Don't know what to do now.

Tom T
tomt491
Registered: Nov 19 2008
Posts: 23
George,

One thing I notice when I've entered the $23.00 amount in a Visible form field and then click the Read Only option, when I go back to the text select mode, the $23.00 amount is missing.

Tom T.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You should set the default value of the fields to the price you want. Does it work now?

Also, there were some important updates to 5.05, specifically related to forms, and also an update to 5.1 (or 5.0.10). You should consider updating. For more information, see: http://www.adobe.com/support/downloads/product.jsp?product=1&platform=WindowsGeorge
tomt491
Registered: Nov 19 2008
Posts: 23
George.

YES, your suggestion about about setting the Default field to 23.00 worked great. I was really concerned that I had a faulty program. I did go to the site you suggested to download the updates to Ver 5.

Thank you for your help.

Tomt491
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
George_Johnson wrote:
Also, there were some important updates to 5.05, specifically related to forms, and also an update to 5.1 (or 5.0.10).
Yes, latest versions are 5.1 for Reader and 5.0.10 for Acrobat.

I tried the form using 5.0.10 : there is an obvious bug, value disapear when the field is settled to "not visible"...