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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Form validation for hidden fields

hitesh_m
Level 3
Level 3

Hi,

I have a form with multiple child panels like -

MainPanel

Name, MaritalStatus and Province

ChildPanel_one (Only visible if MaritalStatus is true in MainPanel)

Spouse Name, Spouse DOB, Spouse Salary 

I have set a validation expression for ChildPanel fields. 

My problem is, even if the ChildPanel is not visible- AEM form validates the  childPanel fields and gives me the validation error.

Right now to avoid this, for every child panel field I have to set validationDisable=true in initialization expression and make it false when MartialStatus is true (Value commit script).  

This is becoming a pain since I have so many fields and so many child panels (Child panels inside child panels as well). 

Any help ??

1 Accepted Solution
urs_h_
Correct answer by
Level 3
Level 3
1 Reply
urs_h_
Correct answer by
Level 3
Level 3