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.
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