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

Cannot input validation code

New Here ,
Oct 03, 2023 Oct 03, 2023

Hi,

I'm trying to populate a dropdown field using the result from a previous dropdown field. 
This is the code i found: 

if(event.value == "Item1")
this.getField("Dropdown2").setItems(["Item 1","Item 2","Item 3"]);
else if(event.value == "Item2")
this.getField("Dropdown2").setItems(["Item 4","Item 5","Item 6"]);
else this.getField("Dropdown2").clearItems();

However, when I try to input this code in the "Run custom validation script" box, the code simply disappears when i click OK after editing.. How can I solve this?

Thanks!

TOPICS
Create PDFs , Edit and convert PDFs , PDF
921
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 ,
Oct 05, 2023 Oct 05, 2023

Hi,

I was able to copy and paste the code into Acrobat in the location you specified and it worked as expected. Can you provide your version of ACrobat/and or check you are up to date?

 

BarlaeDC_0-1696505231155.pngexpand image

 

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 ,
Oct 05, 2023 Oct 05, 2023

Hi,

I was able to copy and paste the code into Acrobat in the location you specified and it worked as expected. Can you provide your version of ACrobat/and or check you are up to date?

 

BarlaeDC_0-1696505231155.pngexpand image

 

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
New Here ,
Oct 11, 2023 Oct 11, 2023
LATEST

Hi,

I managed to solve it in the end with a different code. I think it somehow bugged out and considered any code fault. Working fine now, thanks!

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