Skip to main content
Participant
November 22, 2024
Question

Custom Keystroke Code is not work on pdf form when using Google Chrome

  • November 22, 2024
  • 2 replies
  • 198 views

I created a form in Adobe Acrobat Pro that uses the code below. It works great when the form is open in Adobe but when users open the form in Chrome it does not work. 

 

var Itemlist = this.getField("Sub-Phase_Description1");

if(event.willCommit)
{
switch(event.value){

case "ARC":
Itemlist.setItems(["Architecture"]);
break;

case "CIV":
Itemlist.setItems(["Civil Engineering"]);
break;

case "CON":
Itemlist.setItems(["Construction Services"]);
break;

case "DIG":
Itemlist.setItems(["Digital Solutions"]);
break;

case "ELE":
Itemlist.setItems(["Electrical Engineering"]);
break;

case "MEC":
Itemlist.setItems(["Mechanical Engineering"]);
break;

case "STR":
Itemlist.setItems(["Structural Engineering"]);
break;

case "SUR":
Itemlist.setItems(["Land Surveying"]);
break;

default:
Itemlist.setItems([""]);
break;
}

}

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
November 22, 2024

Report the issue to Google and ask them to fix their faulty viewer.

PDF Automation Station
Community Expert
Community Expert
November 22, 2024

As soon as I read the subject of your post I didn't need to read any further.  Non-Adobe PDF viewers do not always support JavaScripts that work with PDF forms in Adobe.  Web browser PDF viewers are very limited in the scripts they support.