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

SOLVED

AEM6.3 coral touch ui bypass required image using javascript

srinivas_chann1
Level 7
Level 7

Hi ,

i have fileupload marked as mandatory for image field but since i am doing some java-script manipulation, hence  I need to bypass this and still submit the dialog even if the image is empty.

Please let me know how this can be achieved.

<image

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="cq/gui/components/authoring/dialog/fileupload"

                                        autoStart="{Boolean}false"

                                        class="cq-droptarget"

                                        fieldDescription="The  Image ."

                                        fieldLabel=" Image"

                                        fileNameParameter="./image/fileName"

                                        fileReferenceParameter="./image/fileReference"

                                        mimeTypes="[image]"

                                        multiple="{Boolean}false"

                                        name="./Image"

                                        required="{Boolean}true"

                                        title="Upload Image Asset"

                                        uploadUrl="${suffix.path}"

                                        useHTML5="{Boolean}true"/>

Thanks

1 Accepted Solution
Ankur_Khare
Correct answer by
Community Advisor
Community Advisor

If you need required field to work and make it not to work with ur custom then first try to understand how required validation is working and how is it getting called then try writing ur custom code similar to required validation

View solution in original post

4 Replies
jbrar
Employee
Employee

Have you tried removing required="{Boolean}true"

srinivas_chann1
Level 7
Level 7

It is mandatory field .Still need to bypass it

Ankur_Khare
Correct answer by
Community Advisor
Community Advisor

If you need required field to work and make it not to work with ur custom then first try to understand how required validation is working and how is it getting called then try writing ur custom code similar to required validation

View solution in original post