Expand my Community achievements bar.

SOLVED

Selecting an item in a Drop Down Menu to activate a field

Avatar

Level 1

Hi,

I'm using LiveCycle Designer ES to create a dynamic form and I wish to have an 'other' field appear when 'other' has been selected in drop down menu. I've worked out how to give each of the drop down items a Specified Item Value and use this to trigger the presence of the 'other' field. However I'm not sure which event to use to activate the presence code.

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can write the code either in the change event of the dropdown or in the Exit event of the dropdown.

If you use the change event use the below syntax..

     if(xfa.event.newText =="Other")

          fieldName.presence = "visible";

If you are using the exit event use the below syntax..

     if(this.rawValue =="Other")

          fieldName.presence = "visible";

Sample file is at the below location..

https://acrobat.com/#d=QZS2WmRlvgjTIePj8a6mkQ

Thanks

Srini

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can write the code either in the change event of the dropdown or in the Exit event of the dropdown.

If you use the change event use the below syntax..

     if(xfa.event.newText =="Other")

          fieldName.presence = "visible";

If you are using the exit event use the below syntax..

     if(this.rawValue =="Other")

          fieldName.presence = "visible";

Sample file is at the below location..

https://acrobat.com/#d=QZS2WmRlvgjTIePj8a6mkQ

Thanks

Srini