Adding days to a date field and exporting to another date field is broken

  • Profile Image
    bcollins33
    Asked on December 04, 2014 at 10:48 AM

    I have 2 fields, a start date and an end date. When someone fills in the start date, I want the end date to populate with a date that is 1 week after the start date.

    So I'm going into the "Conditions Wizard" and using the "Update a form field value" option.

    I start with the condition, "If {start date} is filled"

    Then my equation is: datestring( {beginning date} + 7)

    Then I try to output that into the End Date field

    But I get an error saying: "If output is datetime field, source must also be."

    I'm not sure what I'm doing wrong.

    Kade: Usually with the datefield we were primarily using {datefield} + 7. I will have to check it to see if I can figure it out, please allow me a few minutest to look into it more for you

    Sure, that would be great.

    Any word on this yet?

    Kade: Unfortunately no, I've tried a few different ways but so far the alternative methods I tried aren't working either at the moment. I think it will be necessary to open up a thread about this in our forum so that we can research this more to try to find a feasible solution to this matter.

    OK. Is that something I need to do? Or can you open up the thread?

    Kade: You can do this here http://www.jotform.com/answers/answer.php

  • Profile Image
    Charlie
    Answered on December 04, 2014 at 12:05 PM

    Hi,

    Unfortunately, I've tried it on my end but I was unable to make it work. This is because adding days, months or years in a date field and outputting it in the same format is not possible right now.

    However, the dateString does work but it computes and output the result in a text string. 

    You can see a sample cloned form that I made here:

    http://form.jotformpro.com/form/43374434410953 

    You can clone it using this guide: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

     

    This might be an alternative, but I think what you are looking for is an output in the actual date field? I still have in mind one workaround but I still haven't tested it yet. I'll get back to you if it works in my end.

    Thank you.