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

SOLVED

Trigger a function (written in rule editor of AEM Form component) from JQuery?

Avatar

Level 2

Hi All,

 

I have a function which is written in AEM Form component's rule editor, I want to trigger this function based on some condition in JQuery.

How to trigger the function call?

 

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Get hold of the event, write a jquery for the event, and place the rule editor code inside the jquery.

This whole logic should be on form initialize or field initialize. 

 

$("#xyzFieldID").click(function(){
 field.value="test";
});

 

@Girish_Biradar 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Get hold of the event, write a jquery for the event, and place the rule editor code inside the jquery.

This whole logic should be on form initialize or field initialize. 

 

$("#xyzFieldID").click(function(){
 field.value="test";
});

 

@Girish_Biradar