Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

Level 10

@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