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.

Dropdown within a repeatable subform item propigation question


Level 3

I have a repeatable subform with a dropdown and an "Add Subform" button. The user enters various information into the subform and may either select an existing item or enter custom text into the dropdown. Then the Add Subform button is pressed.

On the click event, I want to propigate the selected item or entered custom data from the 1st subform (index 0) to the newly added subform (index i).

After doing a resolveNodes I try this:

Array.item(i).dropdownname.rawValue = Array.item(0).dropdownname.rawValue;

But I always get the defult value.

I have also tried various ways to get the selected item or store the selected item (or entered custom data) into another field and use it to either set the rawValue or clearItems()/addItem() in combination, but nothing I try works.

Any assistance is appreciated, thanks!

1 Reply


Level 3

Figured it out in the shower...where I do my best thinking.

Had to save the rawValue, reset the list by setting selectedIndex to -1, then reload the saved value.

Probably other ways to do it, but this works.