AEM6.3 coral touch ui bypass required image using javascript | Community
Skip to main content
srinivas_chann1
Level 7
Oct 23, 2019 2:32 PM UTC
Solved

AEM6.3 coral touch ui bypass required image using javascript

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Ankur_Khare
Ankur_KhareAccepted solution
New Participant
Oct 25, 2019 5:25 AM UTC

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

4 replies

Ankur_Khare
Ankur_KhareAccepted solution
New Participant
Oct 25, 2019 5:25 AM UTC

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

Translate
srinivas_chann1
Level 7
Oct 25, 2019 4:05 AM UTC

Any inputs from any one??

Translate
srinivas_chann1
Level 7
Oct 23, 2019 3:51 PM UTC

It is mandatory field .Still need to bypass it

Translate
Employee
Oct 23, 2019 2:38 PM UTC

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

Translate