Skip to main content
July 15, 2020
Answered

Want Checkbox to Autofill Based On Information From Another Field

  • July 15, 2020
  • 3 replies
  • 1586 views

I'm creating an employee evaluation form using Acrobat Pro DC. I have dropdown boxes for the evaluators to assign a ranking of 1 - 5 for each of twenty-five predescribed statements (e.g., "Excerses good judgement") in five categories (e.g., "Leadership", "Job Knowledge"). At the end of each category there is a field showing the average ranking for the five statements in that category. At the end of the categories there is a field (TotalAvgs) that tallies the five averages. Based on that total I wish to autopopulate a checkbox (or other type of box) in front of the applicable performance rating:

* Does Not Meet Expectations (<15)

* Meets the City's High Expectations (15-19.9)

* Exceeds Expectations (20-22.9)

* Far Exceeds Expectations (23-25)

 

I have written a few logic statements in Excel but don't yet understand how JavaScript works. Can anyone give me some pointers?

 

Not to be pesky but I forsee having two other questions, which I'll bring up after this one, related to Populating a header on all but the first page with the employee's name and How to have the document saved and emailed to the next approver of the evaluation after each signs (e.g. Supervisor, Department Head, HR, City Manager). 

 

Thank you for any help. 

This topic has been closed for replies.
Correct answer try67

PS. Are you sure the last check-box is not called "FarExceed"?

3 replies

try67
Community Expert
Community Expert
July 15, 2020

Use this code as the custom validation or calculation script of the TotalAvgs field:

 

var v = event.value;
this.getField("NotMeet").checkThisBox(0, (v<15));
this.getField("Meet").checkThisBox(0, (v>=15 && v<20));
this.getField("Exceed").checkThisBox(0, (v>=20 && v<23));
this.getField("FarExeed").checkThisBox(0, (v>=23));
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 15, 2020

PS. Are you sure the last check-box is not called "FarExceed"?

July 16, 2020

Mr. Try67, You totally called it! You created the script using my precise descriptions and then warned that it might be incorrect. It was. I corrected the spelling from FarExeed to FarExceed in the last checkbox and bingo! It works! Where can I send a Starbucks gift card?

 

Thank you so much!

July 15, 2020

Hello Most Valuable Participant try67,

Thank you for responding. The name of the text field with the result is TotalAvgs and the names of the four checkboxes are NotMeet, Meet, Exceed, FarExeed.

try67
Community Expert
Community Expert
July 15, 2020

What's the name of the text field with the result, and what are the names of the check-box fields?