Skip to main content
Inspiring
May 15, 2024
Answered

Form code works in Adobe Acrobat Pro DC and Adobe Acrobat Reader on PC but does not work on Adobe Ac

  • May 15, 2024
  • 1 reply
  • 866 views

Hello, I hope you can help me.

 

I have a form that has a conditional code between two boxes. One called "Series" and the other called "UT", the "Series" goes from 1 to 5 and each series has a different list of "UTs". For example: Series 1 is a list of "UT" from 1 to 19, series 2 is a list of "UT" from 1 to 15 and so on, the "UT" varies depending on the series.

 

The problem is that the code works correctly for me if I open the form in Adobe DC or Adobe Reader on the computer, however, when I open the form in Adobe Acrobat Reader on a tablet it does not work correctly since the "UTs" do not change through I'm changing the "Series"

 

Could this be a version problem? Does the Android version of Adobe Acrobat Reader not have this complex code system? since I have other conditional data boxes and they do work. This is the only one that doesn't work. The "Series" and "UT" boxes are drop-down lists

 

This is the code I have and it has the "Serial" field in the "Validate" section:

var series = {
    "1": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"],
    "2": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"],
    "3": ["1", "2", "3", "4", "5", "6"],
    "4": ["1", "2", "3", "4", "5", "6"],
    "5": ["1", "2", "3", "4", "5", "6", "7", "8"]
};

var oFldUT = this.getField("UT");

// Saving the previous value of the UT field
var strPreValue = oFldUT.value;

// Sets a new list of items from the currently selected item "event.value"
oFldUT.setItems(series[event.value]);

// Test if the previous value exists in the new list
// Set the previous value if it exists
var utOptions = series[event.value];
if (utOptions.indexOf(strPreValue) !== -1) {
    oFldUT.value = strPreValue;
}
This topic has been closed for replies.
Correct answer try67

Almost no scripts will work on mobile devices, unfortunately.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 15, 2024

Almost no scripts will work on mobile devices, unfortunately.

Inspiring
May 16, 2024

oh okay, what a shame. Thanks for the prompt response!