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

Adobe Acrobat Form - Error : Bad Parameter while hiding / showing Template

Engaged ,
Jul 16, 2020 Jul 16, 2020

Hi,

I have a form of 4 pages, all 4 have been turned into templates. I have dropdown on MainPage from where user can select Month, according to which corresponding template should show/hide.... ex.. if January is selected then Jan20 template should be visible rest hidden, if February is selected then February should be visible rest hidden..... Below is the script i have used,, everytime selection is changed it throws error "Bad parameter".

 

My adobe version : Adobe acrobat pro DC 20.006.20034.39303

 

Attached is the link of the file: https://www.dropbox.com/s/1sra0teo5w96k93/2020.pdf?dl=0


Here is the javascript

var a = this.getTemplate("Main_Page");
var b = this.getTemplate("Jan20");
var c = this.getTemplate("Feb20");
var d = this.getTemplate("Mar20");

 

var resp = this.getField("Monat").value;
switch (resp) {

case "January 2020":
a.hidden = true;
b.hidden = false;
c.hidden = true;
d.hidden = true;
break;

case "February 2020":
a.hidden = true;
b.hidden = true;
c.hidden = false;
d.hidden = true;
break;

case "March 2020":
a.hidden = true;
b.hidden = true;
c.hidden = true;
d.hidden = false;
break;

case "-Select-":
a.hidden = false;
b.hidden = true;
c.hidden = true;
d.hidden = true;
break;
}

 

Thanks

TOPICS
Acrobat SDK and JavaScript
450
Translate
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 ,
Jul 16, 2020 Jul 16, 2020

Hi,

the file is not available...

@+

 

Translate
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
Engaged ,
Jul 16, 2020 Jul 16, 2020
LATEST
Translate
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