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

Textfield: Adding a custom validation script via UI fails silently

Community Beginner ,
Nov 04, 2022 Nov 04, 2022

Hey!

I am trying to add a custom validation script to a textfield via the UI, i.e. clicking "Properties > Validation > execute custom validation script > edit" (I am translating from a non-english Acrobat version). So, clicking "edit" opens the JavaScript editor and I can write my code but on "Ok" the code is not saved. The code actually shows up for a split second but the radio button jumps back immediately to "Field value won’t be validated" – w/o any further feedback from Acrobat.

 

Weirdly on some of my textfields I actually can add code and it sticks but I can not figure out any pattern why that is. Is this a bug or are there limitiations on when it is possible to add a custom validation script on a textfield?

 

(I am setting up my textfields in InDesign if that is of relevance.)

TOPICS
Acrobat SDK and JavaScript , Mac
287
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

correct answers 1 Correct answer

Community Beginner , Nov 04, 2022 Nov 04, 2022

I figured it out.

Acroabt does not like it when textfields are stacked apparently. The pattern I missed first: I was only able to add custom validation scripts to the textfield on top of my stack. For context: I have a stack of identically placed and initially hidden textfields and I am changing the visibility of them via buttons.

The solution: Exporting with Acrobat layers directly from InDesign, since each of my textfields is on a layer of its own anyways. In Acrobat I am switch through the visi

...
Translate
Community Beginner ,
Nov 04, 2022 Nov 04, 2022
LATEST

I figured it out.

Acroabt does not like it when textfields are stacked apparently. The pattern I missed first: I was only able to add custom validation scripts to the textfield on top of my stack. For context: I have a stack of identically placed and initially hidden textfields and I am changing the visibility of them via buttons.

The solution: Exporting with Acrobat layers directly from InDesign, since each of my textfields is on a layer of its own anyways. In Acrobat I am switch through the visibillity of the layers putting the one I need to attach the script to on top of the stack.

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