CQ5/AEM form not submitting due to mandatory hidden fields

CQ foundation form components are quite nice in handling all the forms logic but if you have got mandatory fields within the form then your form might not get submitted at all as CQ expects all fields to have certain values when you hit submit.

An alternate way you can handle this situation is by putting your own custom form validation jsp file and uncheck all the mandatory attributes from all the form fields which might get hidden under certain business rules.

If you click on edit in Start of Form you Will see two tabs (Form and Advanced). Click advanced and then put the file path in validation resource type that is it.

You can use all the foundation form validations in this script.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s