Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Unable to submit TOUCH UI dialog if hidden Text Field is required

Avatar

Level 4

Hi,

I have created  a TOUCH UI dialog in AEM6.2, and i have three field in dialog

  • drop-down
  • textfield A
  • textfield B

I have used show-hide on selection in drop-drop...

  • On selection A show textfield A which required
  • On selection B show textfield B which required

But I unable to submit the dialog form.

See below my cq:dialog file xml

 

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" jcr:title="Image" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/tabs" type="nav"/> <items jcr:primaryType="nt:unstructured"> <images jcr:primaryType="nt:unstructured" jcr:title="Images" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/> <items jcr:primaryType="nt:unstructured"> <columns jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <imageType jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/select" class="cq-dialog-dropdown-showhide" cq-dialog-dropdown-showhide-target=".imageType-option-listtype-showhide-target" fieldLabel="Image Styles" name="./imageType" value=""> <items jcr:primaryType="nt:unstructured"> <a jcr:primaryType="nt:unstructured" text="A" value="a"/> <b jcr:primaryType="nt:unstructured" text="B" value="b"/> </items> </imageType> <setA jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container" class="imageType-option-listtype-showhide-target foundation-layout-util-vmargin" showhidetargetvalue="a"> <items jcr:primaryType="nt:unstructured"> <heading jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/heading" class="coral-Heading coral-Heading--4" level="{Long}4" text="Options for A"/> <imageA jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/well"/> <items jcr:primaryType="nt:unstructured"> <aOption jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" fieldLabel="A Option" required="true" name="./a"/> </items> </imageA> </items> </setA> <setB jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container" class="imageType-option-listtype-showhide-target foundation-layout-util-vmargin" showhidetargetvalue="b"> <items jcr:primaryType="nt:unstructured"> <heading jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/heading" class="coral-Heading coral-Heading--4" level="{Long}4" text="Options for B"/> <imageB jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/well"/> <items jcr:primaryType="nt:unstructured"> <bOption jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/textfield" required="true" fieldLabel="B Option" name="./b"/> </items> </imageB> </items> </setB> </columns> </items> </images> </items> </content> </jcr:root>
3 Replies

Avatar

Level 10

What is happening when you click OK. I haved used Show/Hide and never seen this issue. 

Avatar

Level 10

For those community members reading this thread and want to know how to use the Show/Hide feature in a Touch UI dialog -- see: 

https://helpx.adobe.com/experience-manager/using/dynamic_touchui.html

Hope this helps. 

Avatar

Level 4

@smacdonald2008  Have you tried to run my code. Its just cq:dialog code.

Can you please try my code to understand the problen?