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

Form Issue with Spawn Pages on Mac vs. Windows

Explorer ,
Jan 30, 2024 Jan 30, 2024

Copy link to clipboard

Copied

Hi everyone,
I would like your guidance, please. I have built a form that includes a Spawn pages. When the user ticks the box, the code below should run and aggregate the pages. It works fine in Acrobat Reader on Windows, but on Mac, it doesn't work (when the box is ticked, nothing happens). Any idea why? and if there is any solution please
Thanks a lot
--------------------------
var checkbox = this.getField("Reader");

if (numPages > 1) {
var confirmed = app.alert({
cMsg: "Are you sure you want to uncheck the box? This will delete your current form.",
cTitle: "Confirmation",
nIcon: 2,
nType: 2,
});

if (confirmed == 4) {
event.target.value = "";
this.deletePages(1, this.numPages - 1);} else {
event.target.value = "Yes";
}
} else {
if (event.target.value !== "Off") {
this.getTemplate("Page2").spawn(1, false, false);
this.getTemplate("Page3").spawn(2, false, false);
this.getTemplate("Page4").spawn(3, false, false);
this.getTemplate("Page5").spawn(4, false, false);
this.getTemplate("Page6").spawn(5, false, false);
}
}

TOPICS
General troubleshooting , How to , PDF forms

Views

159

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 ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

[MOVED TO THE ACROBAT PRO DISCUSSIONS]

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 ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

You must first ensure that Mac users open this form with Acrobat, and not with Preview (which poorly supports PDF features).

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
Explorer ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

Thank you, @JR Boulay , but yes, the user downloaded Acrobat Reader, and it still didn't work. This is why I was wondering why.

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 ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

There's no reason this code should work on Windows and not on a Mac. What exactly happens when they try to use it? Ask them for a full description of the issue, with full-window screenshots. My bet is they're not opening it in Adobe Reader, even if they think they are.

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 ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

LATEST

The first line is useless and this one cannot suit for a checkbox:

event.target.value = "";

It should be "Off" or "Yes".

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 ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

In which trigger did you place this script?

 

However, I think you're complicating things unnecessarily and that the alert is useless: if the user deletes the pages by mistake, all he has to do is tick the checkbox again to respawn them. And as the fields are all duplicates in hidden templates, they will remain filled in and no data will be deleted.

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