Touch UI dialog listeners
Hi,
I am trying to write a simple listener for Touch UI dialog. I have two text fields and when I open the dialog, I want to hide one of the text field. I have couple of articles and they just explained how to show some alerts/email validations.
https://helpx.adobe.com/experience-manager/using/creating-touchui-validate.html
Below is my code:
(function ($, $document) {
"use strict";
$document.on("dialog-ready", function() {
$(window).adaptTo("foundation-ui").alert("Open", "Dialog now open, event [dialog-ready]");
var $form = $(this).closest("form.foundation-form"),
title = $form.find("[name='./jcr:Heading']"),
message, clazz = "coral-Button ";
title.hide();
});
})($, $(document));
But the hide is not working. Can anyone help me to resolve this issue?
Thanks.