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

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

Explorer ,
May 15, 2024 May 15, 2024

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;
}
TOPICS
JavaScript , PDF , PDF forms
763
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
1 ACCEPTED SOLUTION
Community Expert ,
May 15, 2024 May 15, 2024

Almost no scripts will work on mobile devices, unfortunately.

View solution in original post

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 ,
May 15, 2024 May 15, 2024

Almost no scripts will work on mobile devices, unfortunately.

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
Explorer ,
May 16, 2024 May 16, 2024
LATEST

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

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