API Submission Inquiry

  • aa043a
    Asked on August 1, 2025 at 1:27 PM

    Hi Team,

    I've been trying to populate my form using API and I couldn't fill

       "22": { "defaultTime": "none", "description": "", "labelAlign": "Auto", "name": "time", "order": "21", "qid": "22", "range": "No", "readonly": "No", "required": "No", "showDayPeriods": "both", "step": "1", "sublabels": { "hour": "Hour", "minutes": "Minutes", "hourRange": "Hour", "minutesRange": "Minutes" }, "text": "Time", "timeDiff": "No", "timeFormat": "AM/PM", "type": "control_time", "until": "Until" }


    Using the folllwing:

    1. "submission[22][hour]": 5,

    "submission[22][minute]": 0,

    "submission[22][ampm]": "PM"


    2. "22": "05:00 PM"


    but nothing works, could you please advice



  • Podo: Support AI Agent
    Replied on August 1, 2025 at 1:27 PM

    Hi Altaire,

    Thanks for reaching out to Jotform Support. I'm an AI assistant. I'll do my best to help you until someone from the support team is available.

    To populate the Time field using the API, you need to use the correct format for the control_time field. Instead of sending separate hour, minute, and ampm values, try sending the time as a single string in the format "HH:MM AM/PM" for the field ID. For example:

    "22": "05:00 PM"

    Make sure your API request uses this exact format and that the field ID matches the time field in your form. If this still doesn't work, double-check the field's properties in your form to ensure the time format is set to AM/PM and that the field ID is correct.

    Give it a try and let us know how it goes.

    Best regards,
    Jotform Support

  • aa043a
    Replied on August 1, 2025 at 1:29 PM

    got this submitted : "submission[22]": "6:15 PM",  value didn't populate jotform

  • Podo: Support AI Agent
    Replied on August 1, 2025 at 1:29 PM

    Hi Altaire,

    Thanks for the update. When submitting time via API, ensure the time string matches the exact format expected by the form, including leading zeros if needed (e.g., "06:15 PM"). Also, verify the field ID and that the time format in the form is set to AM/PM.

    If the value still doesn't populate, try sending the time as a single string with the field key like this: "22": "06:15 PM" in your submission payload.

    Check these details and adjust accordingly.

    Best regards,
    Jotform Support

  • aa043a
    Replied on August 1, 2025 at 1:35 PM

    got this submitted: "submission[22]": "06:15 PM", but there are no values were populated.

    Here's my form : https://form.jotform.com/252113650822044 if that helps


  • Podo: Support AI Agent
    Replied on August 1, 2025 at 1:35 PM

    Hi Altaire,

    One of our Support Team members has taken over this thread and will assist you further.

    Best regards,
    Jotform Support

  • aa043a
    Replied on August 1, 2025 at 1:37 PM

    Thanks bro, when will I expect the message


  • Arslan JotForm Support
    Replied on August 1, 2025 at 1:45 PM

    Hi Altaire,

    When populating a Time field (control_time) in Jotform using the API, the value must be sent as a single string formatted exactly as HH:MM AM/PM, including leading zeros for hours if needed. For example, use 06:15 PM instead of 6:15 PM.

    Here’s how to do it correctly:

    1. Use the field ID as the key and send the time value as a single string in the format HH:MM AM/PM. For example: 22: "06:15 PM"
    2. Do not send separate hour, minute, or ampm values like submission[22][hour], submission[22][minute], or submission[22][ampm]. The API expects a single string for the time field.
    3. Verify the time format setting in your form’s Time field properties is set to AM/PM to match the format you are submitting.

    Make sure your API payload matches this format exactly and the field ID corresponds to your Time field. This approach should populate the time value correctly in your form.

    Give it a try and let us know how it goes.

  • aa043a
    Replied on August 1, 2025 at 2:10 PM

    Hi Arslan,

    Payload for row 4: {
    "submission[3]": "Jesica",
    "submission[4]": "Espanillo",
    "submission[5][year]": 1995,
    "submission[5][month]": 3,
    "submission[5][day]": 20,
    "submission[5][hour]": 12,
    "submission[5][minute]": 0,
    "submission[5][ampm]": "AM",
    "submission[6]": "Yes",
    "submission[7]": "Yes",
    "submission[8]": "Yes",
    "submission[9]": 34.5,
    "submission[10]": 99,
    "submission[11]": 88,
    "submission[12]": "Time of Measurement",
    "submission[13]": "Arthur Neri",
    "submission[14][year]": 2025,
    "submission[14][month]": 8,
    "submission[14][day]": 1,
    "submission[14][hour]": 12,
    "submission[14][minute]": 0,
    "submission[14][ampm]": "AM",
    "submission[15]": "Yes",
    "submission[16]": 77,
    "submission[17]": 88,
    "submission[18]": 88,
    "submission[19]": "Arthur Neri",
    "submission[20]": "Yes",
    "submission[21]": "None at all",
    "submission[22]": "06:15 AM",
    "submission[23]": ""
    }

    This is the test payload I've sent and everything works well aside from [22] which is :


            "22": {
                "defaultTime": "none",
                "description": "",
                "labelAlign": "Auto",
                "name": "time",
                "order": "21",
                "qid": "22",
                "range": "No",
                "readonly": "No",
                "required": "No",
                "showDayPeriods": "both",
                "step": "1",
                "sublabels": {
                    "hour": "Hour",
                    "minutes": "Minutes",
                    "hourRange": "Hour",
                    "minutesRange": "Minutes"
                }


  • Aries JotForm Support
    Replied on August 1, 2025 at 2:41 PM

    Hi Altaire,

    I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

  • aa043a
    Replied on August 1, 2025 at 2:41 PM

    Looking forward to find the answer. Thanks Aries

  • Aries JotForm Support
    Replied on August 1, 2025 at 4:56 PM

    Hi Altaire,

    When I cloned and tested your form, the current qid for the Time field was 23, and I was able to successfully submit a value via the API, and the submission payload confirms that the time data was saved correctly under the answer section, as shown below:

    "23": {
     "name": "time",
     "order": "21",
     "range": "No",
     "sublabels": "{\"hour\":\"Hour\",\"minutes\":\"Minutes\",\"hourRange\":\"Hour\",\"minutesRange\":\"Minutes\"}",
     "text": "Time",
     "timeFormat": "AM/PM",
     "type": "control_time",
     "answer": {
      "hour": "06",
      "minute": "15",
      "ampm": "AM"
     }
    }

    Could you try making the following API call instead?

    curl -X POST https://api.jotform.com/form/{Form_ID}/submissions ^
     -d "apiKey={Your_API_Key}" ^
     -d "submission[23][hour]=06" ^
     -d "submission[23][minute]=15" ^
     -d "submission[23][ampm]=AM"

    Give it a try and let us know how it goes.

Your Reply