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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

submit a form with a hidden mandatory fields without any value


Level 7

How I can submit a form with a hidden mandatory fields without any value?

when I try to submit the form still ask me for mandatory fields to fill.

Hidden mandatory fields become visible if a condition is met.

Any sample to avoid this problem?

Thank you

0 Replies


Level 4

Try setting the presence to Inactive.  See:

I see that this is not properly documented in the help.  I'll log a bug.


Level 7

I would set the condition to flag the fields as mandatory if they are met. otherwise, it shouldn't be mandatory since it is hidden.

For example:

if (textField1.rawValue == "no"){




else {



   this.parent.textField2.mandatoryMessage="This is required.";


Message was edited by: jasotastic81--corrected the code


Level 7

Thanks very much for your help.

A question:

what this mean: "no"

I suppose the correct is:

textField2.rawValue == "no


textField1.rawValue == "no