April 2, 2020
Estimated Post Reading Time ~

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 the validation resource type that is it.

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



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.