Skip to main content
Participant
Oct 14, 2022 4:34 PM UTC
Question

Check box needs a value

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Thom Parker
Community Expert
Community Expert
Oct 15, 2022 9:52 PM UTC
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Oct 17, 2022 2:34 PM UTC
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
Translate
ls_rbls
Community Expert
Community Expert
Oct 15, 2022 8:44 AM UTC

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).

Translate
Technical Generalist