Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Drop Down Lists and Global Binding

Avatar

Level 3

My form has several drop down lists. I have used global binding to link them, so that when a user selects "Choice A", the same choice is displayed in the other drop downs... this works, but I also need the user to be able to select another choice, say "Choice B" if they desire, and it not, then polulate the other drop downs, with "Choice B"?

Is there another way to link drop down lists, so that if you select an option in the first list, the rest of the drop down lists display the same choice, but then if a different selection was made to one of the lists below, it would not update the all the other lists with that selection?

Hope this makes sense?

Thanks in advance

7 Replies

Avatar

Level 7

You can do that but you'll need to turn off the global binding. Each drop down will need it's own name, it'll be easier for you if they're unique. Let's say you name the first box dd1, the second dd2 and the third dd3. On the exit event of dd1 put this script:

if (dd2.rawValue == null){

     dd2.rawValue = this.rawValue;

}

if (dd3.rawValue == null){

     dd3.rawValue = this.rawValue;

}

This will perpetuate the value selected in box 1 down to the other 2 boxes, provided they're already blank. Then when your user gets to the other 2 boxes, their values are not tied back to the first box.

hope this helps,

djaknow

Avatar

Level 3

Thanks. this works great in a test form, but in my real form, the second and third drop downs do not populate?

Is this because they are on different pages in the form?

Do I need to specify page numbers for the second and third drop downs?

thanks

Avatar

Level 7

That's no problem, you just need to specify the full path to each field. If dd2 is on page 2, the path would be:

formName.subformName.dd2

You also have another option. Click on the dd1 checkbox, then click on the script editor to get the cursor in the script editor while you have focus on dd1. In the form, scroll down to dd2, hold the ctrl button and mouse over dd2. The cursor should change to a V. If you click the field Designer will put the full path to the field in the script editor for you.

Avatar

Level 3

I just can't get it to work in my real form?

I have even copied and pasted the working example that I did in a test form, to my real form and it no longer works?

It must be conflicting with somthing in my real form?

Strange and very frustrating! Works in one form but not in another?

Avatar

Level 7

Could you upload your form to acrobat.com and post the link? If not, I'll also send you a pm with my email in it.

Avatar

Level 3

Many Thanks for your help... I found the problem - I needed

a cup of tea and a cigarette!

Then it all worked as it should!

Avatar

Level 7

The feature I mentioned earlier about ctrl + clicking a field is really handy, if you get that down at least you'll always know you have the correct path reference to the field.

Glad you got it working