Appointment field: date calculations

  • HatchingDragonsNursery
    Asked on June 17, 2020 at 5:23 AM

    Hi, 

    I have the appointment field working in one of my forms, but I would like to make a calculation that could add 30 days to the appointment date and input that value in a different field that would be when the deal is due to close. 

    I have tried using dateString() but nothing has worked so far. Could you help me out with it, please? :) 



    Jotform Thread 2394079 Screenshot
  • Bojan Support Team Lead
    Replied on June 17, 2020 at 7:00 AM

    Greetings and thank you for your message.

    I have created a test form for you. You can access it on the following link:
    https://jotform.com/201682702644049

    Since the Appointment field returns the date and time, it is not possible to solve your problem directly. You first need to add a new Date field to your form and copy the Appointment value there. You need the Update/Calculate Field condition:

    Appointment field: date calculations Image 1 Screenshot 40

    Since Appointment fields are not possible to be used in conditions, you need to test any other field in your form. I have added a new field to my test form and checked if it's empty. If you have some required fields, you can check if they are filled. 

    Appointment field: date calculations Image 2 Screenshot 51

    Now you need to add a Form calculation widget to your form. In it, you need to use dateString function and then simply add 30 days to the newly added date field:

    Appointment field: date calculations Image 3 Screenshot 62

    Feel free to test my form, and to clone it to your account. You can click here to see how to clone the form.

    Please let us know if you have any additional questions.

  • HatchingDragonsNursery
    Replied on June 17, 2020 at 10:23 AM

    That's great! Thanks a lot!