Show/hide related implementation in dialog in AEM 6.3
Hi zeeshan/All,
Show hide dialog fields based on selection in AEM 6.3 Based on the inputs provided here, have been trying on this for quite some time.
My component dialog is like
/apps/sample/components/content/samplleone/cq:dialog/content/items/listing/items/column/items.
Under this directly[direct descendanats] I have the below
I have selection node of type granite/ui/components/foundation/form/select. which has values value1, value2 ....to value6.
Have two more nodes 'x' and 'y' of type granite/ui/components/foundation/container.
Basically on selection of value1 only, I have to show node 'x'. On selection of other values in dropdown, have to show node 'y'.
Tried various things, but no luck.
Custom js Code I tried so far as below :
(function(document, $) {
$(document).on("foundation-contentloaded", function(e) {
showHide();
});
function showHide(){
var value = $("[name='./pagetitle']").val() ;
}
})(document,Granite.$);
Once, I do the above none of the container fields show up and so many errors come up in browser console[which seems to be pointing to some OOTB js files].
Any thoughts/pointers/reference code will be really helpful.