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

Cannot input validation code

New Here ,
Oct 03, 2023 Oct 03, 2023

Copy link to clipboard

Copied

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

Views

520

Translate

Translate

Report

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 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.png

 

Votes

Translate

Translate
Community Expert ,
Oct 05, 2023 Oct 05, 2023

Copy link to clipboard

Copied

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.png

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

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