Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Edit rules in AEM Forms not working (Show/Hide) - AEM 6.5

Avatar

Level 2

Hi Community!

 

I got this issue when configuring a form that needs to have 2 level of Show/Hide rules

 

Form structure

Part 1

Q1-3: Drop-down List

Only if "yes" is answered in these 3 questions will the remaining of the form shows.

Q4-10: Drop-down List

 

Part 2

Q1: Drop-down List (Yes/No question)

Q2: Drop-down List

Q3: TnC

 

First rule set for Part 1 Q4-10 & Part 2: Show ... when Part 1 Q1=yes AND Part 1 Q2=yes AND Part 1 Q3=yes

It is fine so far.

 

The problem is I want to hide Part 2 Q2-3 again if Part 2 Q1 is answered No

When I set a 2nd rule in Part 2 Q2: Show Q2 when Part 2 Q1=yes, else Hide

both rules for Part 2 Q2-3 don't work (they show no matter if Part 1 Q1-3 are answered or not)

 

Another try in Q1:  When Part 2 Q1 is empty, Disable Q2 Q3

No luck either.

 

What should I do to allow both set of rules enabled?

 

Many thanks!!

3 Replies

Avatar

Community Advisor

The problem is I want to hide Part 2 Q2-3 again if Part 2 Q1 is answered No

When I set a 2nd rule in Part 2 Q2: Show Q2 when Part 2 Q1=yes, else Hide

both rules for Part 2 Q2-3 don't work (they show no matter if Part 1 Q1-3 are answered or not)

 

You need to add the rule in Part 2 Q1 dropdown change event.

--------------------------------------------------------------------------------------

Another try in Q1:  When Part 2 Q1 is empty, Disable Q2 Q3

No luck either.

In which event you have added the rules?

 

 

Avatar

Level 2

My attempts:

No rules for Part 2 Q1. Part 2 Q2: Show Q2 when Part 2 Q1 is equal to Yes, else Hide

===============================================

Part 2 Q1: When Q1 is empty, Hide Q2

Part 2 Q2: Show Q2 when Part 2 Q1 is equal to Yes, else Hide

===============================================

Part 2 Q1: When Q1 is not equal to Yes, Hide Q2

Part 2 Q2: Show Q2 when Part 2 Q1 is equal to Yes, else Hide

===============================================

Part 2 Q1: When Q1 is equal to Yes, Show Q2

Part 2 Q2: Show Q2 when Part 2 Q1 is equal to Yes, else Hide

 

Result: All failed to achieve goal

 

The "global" rule (Show ... when Part 1 Q1=yes AND Part 1 Q2=yes AND Part 1 Q3=yes) is enabled in all attempts.

Avatar

Employee Advisor

@Brian_Chau_CLP 

Could you share the form over a shared drive or raise a support ticket to discuss this issue over a call?