Hi,
I am trying to have a hidden field in my dialog so that whenever i open the dialog in edit mode, a random number gets assigned to that hidden field.
Does anyone has any idea about generating random number for a dialog field?
Thanks,
Priya
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You can write javascript [clientLibs (cq.authoring.dialog)] which will be called when dialog loads and assign value to hidden field.
You can use JQuery to handle events. For example, the following code represents the event handler that is invoked when the Touch UI dialog is opened:
$document.on("dialog-ready", function() {
$(window).adaptTo("foundation-ui").alert("Open", "Dialog now open, event [dialog-ready]");
});
Thanks
Arun
Hi,
You can write javascript [clientLibs (cq.authoring.dialog)] which will be called when dialog loads and assign value to hidden field.
You can use JQuery to handle events. For example, the following code represents the event handler that is invoked when the Touch UI dialog is opened:
$document.on("dialog-ready", function() {
$(window).adaptTo("foundation-ui").alert("Open", "Dialog now open, event [dialog-ready]");
});
Thanks
Arun
Great response!
Views
Replies
Total Likes
Thanks for your quick response. I'll try generating it using javascript.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies