What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Trying to POST form data to an external url

    Asked by yonatron on May 19, 2017 at 09:50 AM

    Hi - did you recently change the format of the POST body?

    This used to work differently (Fall of 2016), and now it looks like everything's coming in just like query parameters (inside the POST body!).

    For example I got this as a POST body:

    "submission_id=3710108197598787371&formID=62568855409166&ip=xxx.xx.xx.xx&chooseusername=Goofy5&name%5B%5D=Goofy+&name%5B%5D=Goofus&address%5B%5D=123+main+ave&address%5B%5D=&address%5B%5D=anytown&address%5B%5D=New+Jersey&address%5B%5D=07055&address%5B%5D=United+States&email=jadegreen%40gmail.com&linkedin=Jade+Green"

    Is this what you intended or did I do something wrong?

    I can work with this, but will have to URL decode, change my parsing etc.

    If so, that's fine, but can you assure me that you are (hopefully) going to keep the format this way? (Please!)

    Thanks,

    Jade Green

     

    Page URL:
    https://form.jotform.us/62568855409166

  • Profile Image
    JotForm Support

    Answered by Nik_C on May 19, 2017 at 11:47 AM

    Not sure if format changed, we didn't have such reports recently. I tested the show post data option and this is the response I got and format of the post data:

    Could you please show us response from your form, here is the URL that you should place in your Thank you page: https://www.jotform.com/show-post-data/

    We will wait for your response.

    Thank you!

  • Profile Image

    Answered by yonatron on May 19, 2017 at 12:49 PM

    Do you have any option to POST as JSON?

    Here's what came in from your show-post-data page.

    However this is NOT the raw POST body it has already been parsed and processed.

    The raw POST data is as I showed above.

     Data Submitted:

    Array ( [submission_id] => 3710214797598100061 [formID] => 62568855409166 [ip] => 173.54.39.57 [chooseusername] => texas [name] => Array ( [0] => tex [1] => texan ) [address] => Array ( [0] => 19 sailor lane [1] => [2] => cheyenne [3] => WY [4] => [5] => United States ) [email] => sailor@wyoming.com )

    PHP Code:
    $_POST['submission_id'];
    $_POST['formID'];
    $_POST['ip'];
    $_POST['chooseusername'];
    $_POST['name']['0'];$_POST['name']['1'];
    $_POST['address']['0'];$_POST['address']['1'];$_POST['address']['2'];$_POST['address']['3'];$_POST['address']['4'];$_POST['address']['5'];
    $_POST['email'];

  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 19, 2017 at 02:15 PM

    Hello yonatron,

    Form's POST data is not as JSON object. The output you see by using the sample URL "show-post-data" seems to be parsed but you are anyway not gong to use this in your live form. You will have to write your own PHP server side code to read the POST data.

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!