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

Multiple options in a dropdown, reveal the same text box

New Here ,
Nov 13, 2025 Nov 13, 2025

Hi i cant seem to find an answer to this..

 

I have a dropdown list. The first two options reveal two different text boxes. 

The remaining 2 options should reveal the same third textbox 

 

I am using this javascript:

 

 

 

if (event.value == "Employed / Self Employed") {

    this.getField("GrossSalaryx75-12688").display = display.visible;

} else {

    this.getField("GrossSalaryx75-12688").display = display.hidden;

}

 

if (event.value == "Unemployed") {

    this.getField("GrossSalaryx75").display = display.visible;

} else {

    this.getField("GrossSalaryx75").display = display.hidden;

}

 

if (event.value == "on Jobseekers Benefit")

if (event.value == "on Disability Benefit") {

    this.getField("New o").display = display.visible;

} else {

    this.getField("New o").display = display.hidden;

}

 

The first two work but the other options dont.  😩

 

Is this the right approach?  Im really new to this sorry and thanks for any support! 

 

Ian.

TOPICS
Create PDFs , How to , JavaScript , PDF , PDF forms
51
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 ,
Nov 13, 2025 Nov 13, 2025
LATEST

Use this:

if (event.value == "on Jobseekers Benefit"
    || event.value == "on Disability Benefit") {
    this.getField("New o").display = display.visible;
} else {
    this.getField("New o").display = display.hidden;
}

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 ,
Nov 13, 2025 Nov 13, 2025
LATEST

Use this:

if (event.value == "on Jobseekers Benefit"
    || event.value == "on Disability Benefit") {
    this.getField("New o").display = display.visible;
} else {
    this.getField("New o").display = display.hidden;
}
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