• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Check box needs a value

New Here ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

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.  

TOPICS
Acrobat SDK and JavaScript

Views

51

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2022 Oct 15, 2022

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2022 Oct 15, 2022

Copy link to clipboard

Copied

Read This:

https://www.pdfscripting.com/public/Checkboxes-and-Radio-Buttons.cfm

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

LATEST
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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines