Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to re-fire an event?

Avatar

Former Community Member

How can I re-fire an event?

1. I have a ddlist, that when a list item is selected, it makes a subform containing some checkboxes become visible.

2. If I then select another list item, from the ddlist, it will make yet another subform appear, with more checkboxes....

This works fine.

The problem happens, when I reselect the first list item again in the ddlist.

This should behave like part 1. (shown above)

But the subform that appears is the one from part. 2

It's like I need to re-fire the change event of the ddlist?

Anyone know how I can fix this?

I can't post the form publicly, but could email it, if necessary.

Thanks in advance for any help!

5 Replies

Avatar

Level 10

Hi,

When using the change event with dropdowns, you can't use the .rawValue as this has not been set at the point of selection. Instead you would need to use xfa.event.newText.

I would recommend moving the script to the exit event, as this will work reliably with the .rawValue.

You can script to fire an event (execEvent), but that it not your problem here.

Good luck,

Niall

Assure Dynamics

Avatar

Former Community Member

Hi Niall,

Sent you an email with a better description of the problem.

Many Thanks for your help!

Avatar

Former Community Member

Please don't bother working on this Niall, I have managed to fix it....

Many Thanks anyway!

Avatar

Level 10

Just looking at it now - Glad you have it working

Niall

Avatar

Former Community Member

It was a brutal fix.

I swapped the radio buttons for checkboxes, but made them behave like radio buttons...