Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Repeat the code with each instance

Avatar

Former Community Member
I have a subform with few text fields. one of the textfields has a code written in the exit event. The code executes fine for the instance already created. But if I add another instance of the same subform the exit event is not fired this time.



Do I need to call the exit event in a loop so that it fires every time in the new instance. More importantly HOW? as I have no idea.



please help.



Thanks
5 Replies

Avatar

Former Community Member
Can anybosy please suggest how should I go about this? Please help

Avatar

Former Community Member
Please help...this is really important for me but I have no idea as to how?????Please

Avatar

Former Community Member
Marleen L wrote:

> Please help...this is really important for me but I have no idea as to how?????Please



From your explanation, I can't tell what the issue is. Please explain what you're trying to do in

more detail. The exit event should always be called. Perhaps there is some error with your script.

Posting your script will probably be beneficial as well.



Thanks!

--

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
Sorry about that. I have a subform(Let's Say SF1) that has two radio buttons. selecting one radio button, shows a field (not using presence but using addInstance), while selecting the other radio button the field is removed.

Now I have an add button that adds another instance of the subform SF1. So i see those radio buttons again and now if i choose the radio button, the field does not appear or disappear.

I created a function and paas the object of Radio Button ('this') and use if-else statement to show/hide the field. it works great the frist timee but not when a new instance is added.



I have no idea as to how to correct this.



Thanks in advance!!

Avatar

Level 6
There are some known bugs with radio buttons and dynamic forms. I believe that these bugs may have been fixed in the most recent versions of Acrobat/Reader, but unless you can guarantee that your users are using a newer version than the buggy ones, you should avoid doing any dynamic subformery using radio buttons.



Jared Langdon

www.jlangdon.ca