Copy link to clipboard
Copied
I have done so much searching that my mind is turning to mush, so I hope what I am about to ask makes sense.
Here is the form I am working with.
As you can probably guess, I am adding everything from contracted hours to fully licensed into the total pay rate at the bottom. All of these fields have values that are calculated based on other actions/entries. Now, I have been asked to include a place for a negotiated rate that people can type in their own answer, but I still need this rate to calculate in the total pay rate without adding to the originally contracted rate. Does that make sense?
I need one of two things to happen:
Either when the negotiated base box is checked, the contracted hours (45) becomes zero. Or when I add the percentages, I can somehow eliminate the value of the base rate if there is a value in the negotiated rate.
Thank you for any help!
Copy link to clipboard
Copied
The best way to ask a complicated question is to simplify it. Cut away all the stuff around it until you are left with the essence of what you are trying to do. It helps us a lot cause we don't know anything about your particular form.
You're explanation is not clear. But here are some tips.
1) A field can only have a single value.
2) Any number of conditions can be used to calculate the value, but the conditions must make sense.
3) A field value can be overridden by a manual entry. But there have to be clear conditions for doing so.
So the first thing to do is to write down all the conditions and the results of each set of conditions.
Make sure they are consistent and do not work against each other. And that there is no guessing.
Here's an article on conditional JavaScript calculations:
https://acrobatusers.com/tutorials/conditional-execution
Copy link to clipboard
Copied
Thanks! I simplified my problem like you suggested and resorted to using two checkboxes. If box A is checked, field A appears. If box b is checked, field B appears. This solved my calculation problems, too. The only thing I wish I could do but couldn't figure out how is to only allow one button to be checked at a time but allow different boxes to show as a result of which box was checked. I tried several different scripts to attempt to use this on radio buttons but either I was doing something wrong or it just doesn't work.
Copy link to clipboard
Copied
If you give a group of checkboxes the same name, and different export values, they will act just like radio buttons, i.e. only one can be checked at a time.
Copy link to clipboard
Copied
Your problem is a lack of knowledge about how Acrobat fields and scripting work. If you want to learn more on this topic,
then see this site: pdfscripting.com
Copy link to clipboard
Copied
I tried different export values but I must have been doing something wrong because it didn't work for me.
Copy link to clipboard
Copied
Here's an article that discussed how to setup RadioCheckboxes.
https://acrobatusers.com/tutorials/creating-radio-checkboxes1
It's old (things haven't changed) and mostly about LiveCycle forms (ignore this part), but there is an example file that shows how it done.
Copy link to clipboard
Copied
Thank you! I will check it out. I appreciate your willingness to help and your abundant knowledge. I've read a few of your articles