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.

Clear Form Button - Only Non Pre-Populated Data


Level 4

I require a method for clearing ONLY non pre-populated fields which are visible on the form through hide / show.

I have set the mandatory conditions for required fields only when the container [sub-form] is visible.

Therefore, the code would need to loop through the form, check whether visible, check whether mandatory is set to error, and, only clear those fields that meet the conditions whereby the initialize event is null for those not pre-populated.


Any help is appreciated, which goes without saying.


Thank you in advance for your comments.

0 Replies