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

Fill Textbox with Checkbox TITLE not checkbox VALUE.

New Here ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

I have a simple document with 6 lines, each containing 4 options represented by 4 checkboxes. I have each checkbox exporting a value of "1" so that, when selected, a table below the checkboxes calculates the total number of boxes selected for each option. the checkboxes are currently titled "G_1, G_2, G_3, etc" 

ex:

                Screenshot (1).png

My next hurdle, the question I need help with, is that in the "LOCATION #'S" table, I want the location listed (e.g. "Y: 1 ; R: 5 ; B: 6") not the value. Ideally, it would just list the number (i.e. "1" not "G_1"), although I know this may not be feasible. 

 

any help would be MUCH appreciated, thank you! 

 

 

TOPICS
How to , PDF forms

Views

423

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 ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

I have two more documents like this one, with the same concept applied to more lines, 66 and 200+ lines respectively, and I will be applying this same logic to them. 

Votes

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 ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

You will of course need a script for this. Do you have any experience with JavaScript or programming?

By location, do you mean the Line Number of the first selection?

If so, then there are few ways to approach this. But the easiest is to simply loop through the possibilities, 1-6, and then save the line number where you get the first check for each different type.

 

 

 

 

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

Votes

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 ,
Nov 25, 2019 Nov 25, 2019

Copy link to clipboard

Copied

I am learning JavaScript right now, but I am still pretty new. By location I mean the line number. Do i need to group the lines as a single object, or will the loop still work?

 

Votes

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 ,
Nov 25, 2019 Nov 25, 2019

Copy link to clipboard

Copied

LATEST

No grouping is necessary, but the fields need to be named in such a way that they can be easily identified by the script for automatically generating field names.  The "location" name you want displayed needs to be part of the name. Group naming is only helpful if it simplifies scripting, which I am sure it would for some of what you are doing, but the important part is that the field names can be generated in a way to meets your goals.

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

Votes

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