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.

Hiding fields

Avatar

Former Community Member
Hi,



I have create a form with the use of check boxes which makes certain sub forms visible. I have used the following click event:

III.presence = "visible"

B1.presence = "visible"

B2.presence = "visible"

It works fine. But when someone fills in the form save it and then re opens the form all the sub forms which were visible are hidden again. The data isn't lost and from the moment I click on the check box everything is visible again. Now for users this is confusing. I think the problem is situated with the click event because when you open the form you do not click.



Now how can a user open the form and everything be visible which he already checked.



Maybe you can give an example of the script?
1 Reply

Avatar

Former Community Member
when the form is opened in the form:ready event you mimic the checkbox click event.You can use the chkBox.execEvent("click"); where chckBox is the checkbox which the user clicks

Let me know if you need more help

mergeandfuse@gmail.com