Copy link to clipboard
Copied
I am creating a fairly basic registration form. Users can select multiple sessions throughout the week. What I need to do is allow them to select their sessions, and then have the form display the total cost. In Excel I can have the users enter an "X" in the appropriate cell, then create another cell that says "if A1 = "X", then A2 = $500. I then hide A2 and have another cell display the total of A2, B2, C2, etc.
In Adobe, it seems that I can have a text field with the value of $500 for each session which the user can select, and then have a total field that addes up all the session fields to display the total cost. This works, but is not pretty to look at. It would be better/nicer to have a check box for each session and then have a total field that displayed the amount based on the number of check boxes that were checked.
It seems like this is something that has been done before, but I can't find a good solution. Any and all help is appreciated!
Copy link to clipboard
Copied
It's very easily done, and you don't need to use hidden text fields for the amounts.
Just set the export value of each check-box to the corresponding amount and then use the built-in Sum option under the Calculate tab of your total text field to add the values of all the fields. Only those that are ticked will be included in the sum.
Copy link to clipboard
Copied
It's very easily done, and you don't need to use hidden text fields for the amounts.
Just set the export value of each check-box to the corresponding amount and then use the built-in Sum option under the Calculate tab of your total text field to add the values of all the fields. Only those that are ticked will be included in the sum.
Copy link to clipboard
Copied
Thanks!!
This is exactly what I needed.
Copy link to clipboard
Copied
Hi,
I'm trying to do something similar. I have an order form that has drop downs with export values of how much each item costs. Then I added a text field that calculates the sum of all dropdown items. However, it is adding the export values + the text that is listed on the front end. How can I fix that?
Copy link to clipboard
Copied
That's odd. Can you share the file in question?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I updated the first item to export at 96.00. Try selecting any amount and the totals are calculated by the Appetizers header.
Copy link to clipboard
Copied
Sorry to bother again, were you able to download the form?
Copy link to clipboard
Copied
Yes. Your calculation formula on the drop-downs is incorrect. This is not a valid formula:
=*96
The way to do it is to use a custom calculation script on the total field to multiple the value of each field with the price. That price can be hard-coded into the script, or it can come from another text field, which can be hidden.
Copy link to clipboard
Copied
Thanks so much!
Copy link to clipboard
Copied
Read this article:
https://www.pdfscripting.com/public/How-to-Write-a-Basic-PDF-Calculation-Script.cfm
Find more inspiration, events, and resources on the new Adobe Community
Explore Now