Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Drop-down binding problem

Avatar

Level 3

I have a drop-down list that I have populated. When an item is chosen from the drop-down list it automatically shows the code for that item in another field. I have put these codes in in the Binding section. The problem I'm having is that if a person chooses an item from the drop-down list and then change their mind, the code from the original item stays in the field as well as the new item code.

Is there any way that the field can automatically change to the new item code?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

In the change event of the drop down you can use code similar to;

 

TextField1.rawValue = this.boundItem(xfa.event.change);

Where TextField1 will be your field that needs to be keep in sync.

Here's an example that might help, https://acrobat.com/#d=p*6x4WA4w8NDDlMvq*aspg

Bruce

View solution in original post

3 Replies

Avatar

Level 10

Hi,

This sounds like something you could do by binding the two fields to the same data node or by using global binding if you don't have a data connection.

How is the other field being updated at the moment, I would have put some code in the change event of the drop down list, which should keep the other field in sync also.

Bruce

Avatar

Level 3

Thanks for that Bruce. Can you explain the code that is required in the change event to keep the other field in sync?

Avatar

Correct answer by
Level 10

Hi,

In the change event of the drop down you can use code similar to;

 

TextField1.rawValue = this.boundItem(xfa.event.change);

Where TextField1 will be your field that needs to be keep in sync.

Here's an example that might help, https://acrobat.com/#d=p*6x4WA4w8NDDlMvq*aspg

Bruce