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

  • Profile Image
    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)

  • Profile Image
    Amin_N
    Answered on June 30, 2020 at 02: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.jotform.com-202

    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.jotform.com-202

    1593498556screenshot-www.jotform.com-202

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

    1593498632screenshot-www.jotform.com-202

    Result:

    1593498984Screenshot_2020-06-30 Form.png

    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.