Expand my Community achievements bar.

Rule editor rules not getting applied on Custom AEM Form Component

Avatar

Level 2

Hi Team,

I have a requirement where I have to create a custom Adaptive form component (accordion). I did the following:

1. Created cq:component that extends "fd/af/components/guidefield"

2. Added init.jsp, widget.jsp and cq:template

init.jsp

widget.jsp

widget.html

cq:Template

Now, I dragged and dropped the above component to the panel within Adaptive form Fragment

Any rule applied to the component which is being added to the accordion panel (highlighted in bold in widget.html) doesn't work.

Please suggest.

13 Replies

Avatar

Level 10

Please post a screen shot of you are seeing.

Avatar

Level 2

Hi Smac,

accordion.png

In the above screenshot, highlighted is the custom accordion component. Requirement is to whenever user selects option "Yes", the textfield above it hides. Below is the snapshot of the rule.

ruleeditor.png

But it didn't worked.  I also tried applying the rule on the textbox not contained within the custom component but that also didn't worked.

Avatar

Level 10

How are you developing this custom component - are you using a JS lib and client libs?

Avatar

Level 2

Component is developed by extending the guidefield. Currently there is no clientlibs involved

Avatar

Employee Advisor

There is out of the box Accordion layout. any reason that is not being used?

Avatar

Level 2

I have to implement other customisation in accordion. So thought of creating the new one. Is there any thing I am missing for which rule-editor rules are not working.

Avatar

Employee Advisor

Hi Jatin,

Going by a comment in one of the previous post where you mentioned that it is not working outside the custom component as well, can you please attach the custom accordion package here(if possible) and secondly use OOTB accordion and check for the similar rule.

Please confirm your AEM forms version and the CFP level as well.

Regards,

Mayank Gandhi

Avatar

Level 10

Great suggestion, please test the ootb one to see if that works.

Avatar

Level 10

Also - one of our form experts stated -- "If they’re extending one of the existing components which is the recommended approach I would expect all capabilities to be supported."

Are you extending an OOTB component?

Avatar

Level 2

Hi Smac,

Currently, I am extending the guidefield to create the accordion widget.

Avatar

Level 10

According to the team - if you extend an OOTB component - it should work. This could be a bug. Please log a support ticket,

Avatar

Level 2

Hi Mayank,

I tried using OOTB accordion layout, the rules work perfectly fine. Is there something that I am doing wrong in the code mentioned above for the custom accordion.

We are using the default form package that is shipped with AEM6.2. No additional package has been installed for the same.