Skip to main content
georgej23717972
Participant
November 13, 2018
Answered

JavaScript validation action not working on mobile

  • November 13, 2018
  • 1 reply
  • 639 views

I have this piece of JS code that aims to conditionally present form fields based on earlier selections. This works as expected on non-mobile devices. But, on mobile devices it does not. Here is code. I am working on andriod and have not checked any IoS devices. Any help is greatly appreciated.

switch (event.value) {

   case "Australia":

       this.getField("q8_input8").setItems(["-","O1","O2","O3", "O4"]);

       break;

case "South America & Canada":

       this.getField("q8_input8").setItems(["SAC1","SAC2","SAC3", "SAC4"]);

       break;

}

if(event.value)   this.getField("q8_input8").display = display.visible;

else   this.getField("q8_input8").display = display.hidden;

This topic has been closed for replies.
Correct answer try67

Most scripts won't work on mobile devices, as the applications there have very little support for JavaScript.

On iOS devices you should give PDF Expert by Readdle a try. It's not free but provides the best JS support, currently.

On Android there's no such alternative, unfortunately.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 13, 2018

Most scripts won't work on mobile devices, as the applications there have very little support for JavaScript.

On iOS devices you should give PDF Expert by Readdle a try. It's not free but provides the best JS support, currently.

On Android there's no such alternative, unfortunately.

georgej23717972
Participant
November 13, 2018

Thank you try67​for the very quick response. Was hoping for a better resolution though. . We will have to look for maybe a non-pdf solution for mobile users i am afraid here.