How can I submit date via html form GET method as one field?

  • bugra_cc
    Asked on August 18, 2015 at 3:01 AM

    Hi,

    I am using Jotform as my order page. There is a date field on my order form.

    I want to add a datepicker on my product page via html. When the visitor chooses a date and clicks BUY on the product page, I want the visitor to go to the purchase page and see the date field pre-populated.

    I am using the <input type="date"></input> code for the date.

    The problem is the html submits date as one filed. But Jotform requires it as three seperate fields input[day], input[month], input[year]. The only workaround I found was to make three seperate text fields in format of date, but in this case the datepicker wouldn't show up.

    Here are what I tried already:

    1. My initial BUY NOW html form with <input type="date" name="myjotformfieldid"> and Jotform with regular date field.

    What happens in this case is that Jotform fills the whole date (e.g. 01/01/2015) in the DAY field and leaves month and year empty.

     

    2. My initial BUY NOW html form with <input type="date" name="myjotformfieldid"> and Jotform with date Litemode.

    In this case it doesn't fill anything at all.

     

    3. My initial BUY NOW html form with <input type="text" name="myjotformfieldid[day]"> <input type="text" name="myjotformfieldid[month]"> <input type="text" name="myjotformfieldid[year]">

    In this case it works perfectly fine, except that I can't use the datepicker in the initial form which I would very much like.

     

    --

     

    So the question becomes, is there any way at all to prepopulate the date field with one variable, not with three?

    (It's so weird that Jotfrom fills the DAY field when I submit the whole date in the regular format but not when it's litemode).

     

    Best,

     

    Bugra

     

     

  • Chriistian Jotform Support
    Replied on August 18, 2015 at 8:38 AM

    Hi,

     

    As per checking, the only way to prepopulate ta date field is to use the separate tags such as date[month], date[day], and date[year]. If you can please provide to us the link or name of the form in question so we can further analyze and suggest an alternative solution?

     

    We will wait for your response.


    Regards. 

  • endocrinologyconsultants
    Replied on December 5, 2016 at 1:16 AM

    I'm having the same issue, would like to use only one <input type="date"> instead of the 3 fields. For datepicker and also mobile users.

    I'm imagining I can use jQuery to populate the 3 fields that could be hidden but this is a cumbersome fix.

  • endocrinologyconsultants
    Replied on December 5, 2016 at 1:21 AM

    OK, I think I found it, the solution is to go to setting and turn LITE MODE on How can I submit date via html form GET method as one field? Image 1 Screenshot 20

  • Chriistian Jotform Support
    Replied on December 5, 2016 at 2:15 AM

    Hi,

    Glad that you had found solution about your concern.

    If you have other questions or concerns, please let us know. We'll be happy to assist you.

    Regards