Skip to main content
ytk1978
Known Participant
July 11, 2018
Answered

adobe form help -currently using Acrobat XI

  • July 11, 2018
  • 1 reply
  • 853 views

Please help and would be greatly appreciated. 

I have a form that I input a value from 1 to 9.  value input can be 1, 1-2, 2, 2-3, 3, 3-4, 4, so on up to 8-9, 9.

when the value is inputted (from 1 to 9) , can I make a form that automatically puts a check mark on the appropriate check box?  I have three check mark box which are mild, moderate and severe.

to clarify here is example:

in the text box type in 3 and the mild check box will get checked automatically.  if value is updated to 8-9 "severe" check mark box will be checked.

THANK YOU SO MUCH for your help.

This topic has been closed for replies.
Correct answer try67

Use this code as the custom validation script of "VAS1":

var vas = event.value;

var cb = this.getField("Check box 1");

if (vas=="1" || vas=="1-2" || vas=="2" || vas=="2-3" || vas=="3") cb.value = "mild";

else if (vas=="3-4" || vas=="4" || vas=="4-5" || vas=="5" || vas=="5-6" || vas=="6") cb.value = "moderate";

else if (vas=="6-7" || vas=="7" || vas=="7-8" || vas=="8" || vas=="8-9" || vas=="9") cb.value = "severe";

else cb.value = "Off";

1 reply

try67
Community Expert
Community Expert
July 11, 2018

Which values correspond with each check-box?

What are the names (and export values) of the fields involved?

ytk1978
ytk1978Author
Known Participant
July 11, 2018

Mild check box will be values of 1; 1-2; 2; 2-3; 3

Field Name: Check box 1; export value mild

Moderate check box will be values of 3-4; 4; 4-5; 5; 5-6; 6

Field Name: Check box 1; export value moderate

And severe check box will be vlaues of 6-7; 7; 7-8; 8; 8-9; 9.

Field Name: Check box 1; export value severe

Name of text box getting the value from1 to 9 is VAS1.

THANK YOU. So much for your help!

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 11, 2018

Use this code as the custom validation script of "VAS1":

var vas = event.value;

var cb = this.getField("Check box 1");

if (vas=="1" || vas=="1-2" || vas=="2" || vas=="2-3" || vas=="3") cb.value = "mild";

else if (vas=="3-4" || vas=="4" || vas=="4-5" || vas=="5" || vas=="5-6" || vas=="6") cb.value = "moderate";

else if (vas=="6-7" || vas=="7" || vas=="7-8" || vas=="8" || vas=="8-9" || vas=="9") cb.value = "severe";

else cb.value = "Off";