Expand my Community achievements bar.

SOLVED

Drop down value displays in another text field

Avatar

Level 7

Hello - I found this script in the Forum, but I'm not able to get it

to work. I have the script in the change event of the drop down field. Whatever is chosen in the ddl, should then appear in TextField12. The ddl works fine, but the value selected is not displaying in the text field on page 4.

if

(xfa.event.fullText == "Supervisor")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Supervisor";

}

if

(xfa.event.fullText == "Manager")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Manager";

}

if

(xfa.event.fullText == "Director")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "Director";

}

if

(xfa.event.fullText == "VP")

{

page4.pcEquip.dirAbove.TextField12.rawValue

= "VP";

}

else

{

page4.pcEquip.dirAbove.TextField12.rawValue

= null;

}

Any help is appreciated.

Thanks,

MDawn

1 Accepted Solution

Avatar

Correct answer by
Level 6

I would use generic code like follwing.....in change event of DD...

if

(xfa.event.change != "Please Select") { //when any thing other than 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= xfa.event.change; //assign current selected value to text field.

}

else { //when 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= ""; //clear the TextField value

}

Good luck

View solution in original post

2 Replies

Avatar

Correct answer by
Level 6

I would use generic code like follwing.....in change event of DD...

if

(xfa.event.change != "Please Select") { //when any thing other than 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= xfa.event.change; //assign current selected value to text field.

}

else { //when 'Please Select'

     page4.pcEquip.dirAbove.TextField12.rawValue

= ""; //clear the TextField value

}

Good luck