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

Dropdown property

Community Beginner ,
Oct 30, 2023 Oct 30, 2023

Hi! I don't have any experience with script,  I need to create a custom script in my Adobe Acrobat form.

 

I have created a dropdown list with insurance names.+ I have created a text field for each of them.  In want in order for the form to be able to automatically associated text fields, they should be visible on the form when a selection is made from the drop-down list, while all others will be hidden.

 

I need help, thanks in advance.

 

 

 

 

 

 

 

 

319
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 30, 2023 Oct 30, 2023

You need to ask program questions in the forum for the program you are using
To ask in the forum for your program please start at https://community.adobe.com/
Moving from Using the Community (which is about the forums) to the Acrobat forum

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 30, 2023 Oct 30, 2023
LATEST

The basic code is something like this (as the drop-down field's custom Validation script):

 

if (event.value=="Company1") {
	this.getField("Text1").display = display.visible;
	this.getField("Text2").display = display.visible;
} else {
	this.getField("Text1").display = display.hidden;
	this.getField("Text2").display = display.hidden;
	this.resetForm(["Text1", "Text2"]);
}

if (event.value=="Company2") {
	this.getField("Text3").display = display.visible;
	this.getField("Text4").display = display.visible;
} else {
	this.getField("Text3").display = display.hidden;
	this.getField("Text4").display = display.hidden;
	this.resetForm(["Text3", "Text4"]);
}
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