Trigger a function (written in rule editor of AEM Form component) from JQuery? | Community
Skip to main content
Girish_Biradar
Level 2
May 2, 2020
Solved

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

  • May 2, 2020
  • 1 reply
  • 3510 views

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Gandhi

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 

1 reply

Mayank_Gandhi
Adobe Employee
Mayank_GandhiAdobe EmployeeAccepted solution
Adobe Employee
May 4, 2020

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