0
Explorer
,
/t5/acrobat-discussions/checkbox-value-in-text-field/td-p/11921809
Mar 24, 2021
Mar 24, 2021
Copy link to clipboard
Copied
Hi
I have 5 check Boxes named as Check Box1, Check Box2, Check Box3, Check Box4, Check Box5
& a TextField named as Score. I want when I check (Check Box1) a Value 5 appear in Score textfield.
& when i check Check Box2 value 10 appears in Score text field & so on.
Any help?
Thanks & Regards
Junaid Khalid
TOPICS
Create PDFs
,
JavaScript
,
PDF forms
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2 ACCEPTED SOLUTIONS
Community Expert
,
/t5/acrobat-discussions/checkbox-value-in-text-field/m-p/11922034#M304710
Mar 24, 2021
Mar 24, 2021
Copy link to clipboard
Copied
If you are gonna check only 1 you can use this code:
if(this.getField("Check Box1").valueAsString != "Off")
event.value = "5";
else if(this.getField("Check Box2").valueAsString != "Off")
event.value = "10";
else if(this.getField("Check Box3").valueAsString != "Off")
event.value = "15";
else if(this.getField("Check Box4").valueAsString != "Off")
event.value = "20";
else if(this.getField("Check Box5").valueAsString != "Off")
event.value = "25";
else event.value = "";
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/acrobat-discussions/checkbox-value-in-text-field/m-p/11922127#M304725
Mar 24, 2021
Mar 24, 2021
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-discussions/checkbox-value-in-text-field/m-p/12750764#M350472
Feb 14, 2022
Feb 14, 2022
Copy link to clipboard
Copied
Where does you use the script?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more


-
- 1
- 2