Approval validation based on user request over a time period

  • Profile Image
    Asked on June 24, 2021 at 11:49 AM


    I've got a question about applying logic to a form after it is submitted. For a time off request, users must submit the request 2 weeks prior to the date requested. In addition, we only allow 3 requests to be entered in any 2 week timeframe.

    I am assuming we could do this with approvals, but I would like to apply an automatic rule to determine this vs. someone manually checking this.

    Could you provide some insight or an example on what method would be best to accomplish this?

    Thanks in advance!

  • Profile Image
    Answered on June 24, 2021 at 06:05 PM

    Hello @Spectra_Care,

    Thank you for contacting Jotform Support.

    Unfortunately, it is not currently possible to create conditions that will trigger based on prior submissions. The conditions of a form can only be triggered while the form is being filled.

    Meaning that it will not be possible to prevent someone from submitting your form multiple times within a specific time frame.

    However, you can set up some conditions that will prevent submission for time off requests if it is within less than 2 weeks of the requested date. This can be done with the Date Difference Widget.

    With this widget, you can have your employees enter the current date and also the date they are requesting. Then you can set up a condition that will copy the date difference into another form field. Then, you can set up a second condition that will check the number of days between the current date and the requested day off. If the number of days is less than 14, you can hide the submit button and show an error message that tells the user they cannot request days off less than 14 days away.

    Here is a simple form for you to test -