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.

AEM forms attachment click event overriding

Avatar

Level 6

Hi Team,

 

We have AEM forms and we are using attachment in our form.

on click of attachment OOTB is deleting the file but we need to some more activity on click can we overide delect  click event of  forms attachment component,

If yes let us know the process.

 

@Mayank_Gandhi @Pulkit_Jain_   Need your input here

 

Regards

Manikantha R

 

 

5 Replies

Avatar

Employee Advisor

@manikanthar1295 you can create an event handler. Put it in client libs or code editor. 

Avatar

Level 6

HI Mayank,

 

Thanks for your quick response.

if you have any example how to handle  event please share some snippet or code so that i can understand and proceed further. 

Avatar

Level 1

Can you help me figure out which script is being invoked for the click event. The click event being, the delete of the attached file. 

Essentially what I want is this:

On delete of an attachment, I need to invoke my custom validation method.

The 1st time when I attach documents, my custom validation method is called. But when an attachment is deleted, my custom validation method is not called as the default handle click event is being called which does not have reference to my custom validation method.

Any inputs will be helpful.

 

 

Avatar

Level 6

Can you help me figure out which script is being invoked for the click event. The click event being, the delete of the attached file. 

Essentially what I want is this:

On delete of an attachment, I need to invoke my custom validation method.

The 1st time when I attach documents, my custom validation method is called. But when an attachment is deleted, my custom validation method is not called as the default handle click event is being called which does not have reference to my custom validation method.

Any inputs will be helpful

 

@Mayank_Gandhi need your input here