Skip to main content
Participant
November 13, 2025
Answered

Multiple options in a dropdown, reveal the same text box

  • November 13, 2025
  • 1 reply
  • 61 views

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.

Correct answer Bernd Alheit

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;
}

1 reply

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
November 13, 2025

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;
}