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

Adobe Javascript Check If Checkbox on Different (also opened) Form is Checked.

Community Beginner ,
Oct 16, 2019 Oct 16, 2019

Copy link to clipboard

Copied

Hello,

I'm trying to figure out the javascript needed for the follow scenario. Two PDFs are open. If a checkbox on one PDF is checked then several fields on a different, also opened, PDF become visible. If unchecked the fields would become hidden. I've been searching online but can't find any reference for checking fields on a different form. Usine Adobe Acrobat Standard DC.

Views

449

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
LEGEND ,
Oct 16, 2019 Oct 16, 2019

Copy link to clipboard

Copied

You will need to assign a unique object name to the second PDF when you open it. This can only be done using the app.openDoc() method. You will have to make sure the this.disclosed property is set in the second PFD.

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 Beginner ,
Oct 17, 2019 Oct 17, 2019

Copy link to clipboard

Copied

Thanks for the info. I should have included what code I had, as I already had the app.openDoc. What I'm having trouble finding an example of is referencing the form fields that are on a different pdf. Here is the code I have on the first form that is opened. As you can see it opens up a pdf called 066p_PAF. Would this be where I also include the "this.disclosed" statement? I added it and don't get an error. So now when the 066p_PAF form is opened, can I just used the checkbox names used on the first form? Here is the code I have. if (this.getField("026Cb").value != "Off" && this.getField("053Cb").value != "Off" && this.getField("065Cb").value != "Off" && this.getField("068Cb").value != "Off" && this.getField("069Cb").value != "Off" && this.getField("071Cb").value != "Off" && this.getField("072Cb").value != "Off") {app.openDoc("/S/shz_online_agreements/site_files/packets/066p_PAF.pdf");this.disclosed = True};

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 ,
Oct 17, 2019 Oct 17, 2019

Copy link to clipboard

Copied

LATEST

Set the disclosed property in 066p_PAF.pdf.

 

var doc = app.openDoc("/S/shz_online_agreements/site_files/packets/066p_PAF.pdf");

then you can access the fields with doc.getField(" ... ");

 

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