How do I conditionally show a message if user chooses a date that's three days later from current date (dynamically, not fixed)?

  • joshua.blaim
    Asked on June 29, 2020 at 11:45 PM

    For this scenario today's date is01/07/2020 please keep this in mind

    hello,

    I would like to know something 

    if a customer selects there next delivery date with in3 days of filling out this form I would like to add a pop up that says 


    Your delivery date is to close to production please select when your delivery after this one will accrue.

    (calendar dropdown) customer picks a date)

  • Amin JotForm Support
    Replied on June 30, 2020 at 2:35 AM

    That can be easily done using Show/Hide Conditional Logic and Calculation Widget.

    Kindly follow the steps below:

    1. Add two Date Pickers. One for user to select a date, and the other one is set to be hidden and showing current today's date.

    1593498525screenshot www Screenshot 10

    2. Add two Calculation Widgets. One to calculate value of user's chosen date, and the other one to calculate current date plus 3 days.

    1593498577screenshot www Screenshot 21

    1593498556screenshot www Screenshot 32

    3. Create a SHOW condition to show your message if user's chosen date is 3 days later from current date.

    1593498632screenshot www Screenshot 43

    Result:

    1593498984Screenshot 2020 06 30 Form Screenshot 54

    My demo form: https://form.jotform.com/201811700977050

    Feel free to clone my form.

    Related guides:

    How-to-Clone-an-Existing-Form-from-a-URL

    How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    How-to-Perform-Form-Calculation-Using-a-Widget

    Should you have any further inquiries, we will be more than happy to help.