Limit form avaliability by date
Hi,
I have a form that I need to make available for users to fill between the 1st and the 15th of each month.
How can I do that?
Or in General if I have a form that should only be available to fill between certain dates, how do I set it up?
The only solution I have at the moment is to remove all users, but me from the initiators when the form is closed.
I'd love some help
Thank you
AgilePoint NX v8.0 SU2.3
-
Hi Yana,The mentioned requirement can be achieved by having custom JavaScript in the Form Level. Please find the custom script below.
eFormEvents.onFormLoadComplete = function () {
var dt = new Date();
var dayOfMonth = dt.getDate();
if (dayOfMonth > 15) { // The condition can be changed based on the requirement
$(document.getElementById('container')).hide();
$('input[type="button"]').unbind('click');
// To show popup dialog
eFormHelper.showDialogMessage(
{
value: "At this moment, Access to the Form is unavailable.",
messageType: eFormHelper.constants.messagetype.Warning,
title: 'Warning'
}, function (output) { });
}
}Please feel free to modify the custom script as required.
Thanks,
Md Sahabuddin
Please sign in to leave a comment.
Comments
2 comments