Limit form avaliability by date

Comments

2 comments

  • Avatar
    Sahabuddin
    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

    1
    Comment actions Permalink
  • Avatar
    Yana

    Hi Sahabuddin,

    Thanks so much for your reply! 

    This code worked ! 

    Wish it was a build-in setting and not some thing we had to do with code! 

     

    Thanks alot

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.