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

Check Boxes fill out 3rd page

New Here ,
Feb 19, 2020 Feb 19, 2020

Copy link to clipboard

Copied

I want to know if there's a way to fill out a separate form depending on what boxes I check on the first 2 forms. Like if I click on check box 1, 3, and 5, then it'll fill out fields in 1a, 1b, 2a, 2b, 3a, and 3b in the last form. Just the same, reverse if the boxes are unclicked. Also, after you unclick them and click on 2 and 3, then it'll fill out 1a, 1b, 2a, 2b, 3a, and 3b. Any help with this issue would be greatly appreciated.

TOPICS
Acrobat SDK and JavaScript

Views

123

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 ,
Feb 19, 2020 Feb 19, 2020

Copy link to clipboard

Copied

Also, I should mention that the info that goes on the 3rd page won't be the same as the information on the 1st page. For example, I want it to be where if I click on check box 1, then the information that will appear on the 3rd page will be something like Aces, Kings, Queens. Then unclicking box 1 and clicking on check box 2 will fill out Tens, Nines, Eights in place of the Aces, Kings, and Queens. Then if you click on both, then it'll fill out the form with all the above listed in order of when you clicked on them.

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 ,
Feb 19, 2020 Feb 19, 2020

Copy link to clipboard

Copied

If by "form" you mean pages in the same PDF, then yes, this is possible with a script. 

The best approach would be a custom calculation script in a hidden text field. Calculation scripts are run anytime any field on the form is modified. So they are both dangerous and very useful. 

Here are some articles on calculation scripts.

 

https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations/

https://www.acrobatusers.com/tutorials/conditional-execution/

https://www.pdfscripting.com/public/Calculating-field-values-and-more.cfm

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 ,
Feb 27, 2020 Feb 27, 2020

Copy link to clipboard

Copied

Thank you so much for all of these resources. They've helped out a ton. I've got half of what I was looking for. Now I'm trying to figure out how to apply a way to have several check boxes that fill out a single text box without overwriting each other. I want it to just add it into the text box as a new line (like hitting enter before typing something else in), and if I checked on several then decide to uncheck something, it'll remove that from the text box, and mover everything else up so there's no gap in between each new line.

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 ,
Feb 27, 2020 Feb 27, 2020

Copy link to clipboard

Copied

LATEST

Use a calculation script in the text field where the text will appear.

 

For example:

*The checkboxes are named "Grp1.Chk1", "Grp1.Chk2", etc.

*The text values are the export values of the checkboxes.

 

event.value = "";

var aFlds = this.getField("Grp1").getArray();

for(var i=0;i<aFlds.length;i++)

{

     if(aFlds[i].value != "Off")

         event.value = aFlds[i].value + "\n";

}

 

 

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