Skip to main content
Participant
October 14, 2022
Question

Check box needs a value

  • October 14, 2022
  • 2 replies
  • 345 views

I would like to know what script to use to have a value assigned (value of 1) to a checked box (named 1-1) only when checked.  

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
October 15, 2022
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
October 17, 2022
Thank you for that answer and link. I was able to learn something very helpful to use in my work!!

Abby Lyons
--
Abby Lyons, BHSc, CCRC, RT (R)
Clinical Research Coordinator
Department of Radiology and Medical Imaging
University of Virginia
Phone: (434) 924-6946
ls_rbls
Community Expert
Community Expert
October 15, 2022

For widgets such as a check box or  radio buttons you don't need a script to assign itself a value.

 

For example, if you're trying to use an equation executed in another field  that needs to add the value of one (1) to the total value when the checbox is checked,  you may assign an export value to the checkbox manually.

 

Depending on what exactly are you trying to achieve,  you can employ a conditional script that can check for the Off status of the check box.

 

You can execute such script  as Mouse-Up event from the check box field itself or as a custom calculation script from another field object (i.e. dropdown menu, listbox, textfields).