Question
Hide dialog for a specific dropdown value
I have a dialog that is only relevant to 2 out of 3 dropdown options and would like to hide it if option-1 is shown
I know how to set up the xml to SHOW dialog if an option is selected but not to HIDE it for a selected option and am not sure what I need to update to hide for a specific value.
Any input would be appreciated.
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
granite:class="cq-dialog-dropdown-showhide"
class="cq-dialog-dropdown-showhide"
cq-dialog-dropdown-showhide-target=".layout-showhide-target"
fieldLabel="Select component layout"
name="./options">
<items jcr:primaryType="nt:unstructured">
<option-1
jcr:primaryType="nt:unstructured"
text="Option 1"
value="option-1"/>
<option-2
jcr:primaryType="nt:unstructured"
text="Option 2"
value="option-2"/>
<option-3
jcr:primaryType="nt:unstructured"
text="Option 3"
value="option-3"/>
</items>
</options>
<hide-for-option-1
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container"
class="hide layout-showhide-target"
showhidetargetvalue="option-1">
<items jcr:primaryType="nt:unstructured">
<img
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Image Path (https://dsg.images.harmony.epsilon.com/)"
name="./img"
required="{Boolean}false"
value="https://dummyimage.com/1200x1000/fffb00/1a1a1a.jpg?text=Missing+assets"/>
</items>
</hide-for-option-1>