Skip to main content
rakeshk21205956
Inspiring
Jul 16, 2020 1:02 PM UTC
Answered

Error: Bad parameter while hiding/showing template;

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,, everything is working fine... except everytime is changed the selection it throws error "Bad parameter"

 

Attached is the link of the file: https://www.dropbox.com/s/5ht33asjvy5r0to/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

This topic is closed to new replies. Start a new post to keep the conversation going.
rakeshk21205956
rakeshk21205956Correct answer
Inspiring
Jul 16, 2020 3:41 PM UTC

Hi,

 

Can you repost the document, as I get a document not there link?

 

Regards

 

Malcolm


here is the file link

https://www.dropbox.com/s/1sra0teo5w96k93/2020.pdf?dl=0

15 replies

Bernd Alheit
Community Expert
Community Expert
Jul 16, 2020 2:04 PM UTC

In what app does you get the error message?

Translate
rakeshk21205956
Inspiring
Jul 16, 2020 2:20 PM UTC

Adobe Acrobat Pro

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 16, 2020 2:44 PM UTC

What version?

Translate