Copy link to clipboard
Copied
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.)
1 Correct answer
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
...Copy link to clipboard
Copied
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.

