Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Show/Hide field of selectbox aem 6.3

Avatar

Level 2

Show/Hide field: Oke, but one field required = true. when select hide it, click submit error valid required field is not blank

Please help me!

1 Accepted Solution

Avatar

Correct answer by
Level 10

In case you are referring to OOTB show/hide feature for fields, I don't there is an option to avoid this.

This is the file which contains logic, you can try to modify it

/libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js

Probably you need to remove the required validation for the fields which are hidden in a particular state

Note: By modify I mean, overlay this file in /apps as no changes should be performed under /libs

Thanks

View solution in original post

4 Replies

Avatar

Community Advisor

is this a question ?? can u frame that little better ?

Avatar

Correct answer by
Level 10

In case you are referring to OOTB show/hide feature for fields, I don't there is an option to avoid this.

This is the file which contains logic, you can try to modify it

/libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js

Probably you need to remove the required validation for the fields which are hidden in a particular state

Note: By modify I mean, overlay this file in /apps as no changes should be performed under /libs

Thanks

Avatar

Level 1

In case, someone stumbles at this post and is still wondering how to exactly skip required field validation for hidden fields, can look at my blog post about it.

AEM Touch UI required field validation that works with show/hide of dialog field