Understanding the Name/Value pair convention of the Webhook

  • AmSteve
    Asked on July 1, 2014 at 8:24 PM

    I'm trying to implement the server-side handling of a submitted form using the Webhooks integration.

    My script is catching the POST Form data from jotform.com but instead of Name/Value pairs that match the field names of my jotform, I'm seeing fields like formID, submissionID, webhookURL, and so on. Clearly jotform-specific fields related to my form but not literally the form data itself. One of the fields has the dataset I'm expecting to see: rawRequest.

    That looks like a json representation of my form. Am I expected to parse the form field named 'rawRequest' and break out my own form values from that? Or am I missing something basic in the Webhooks integration.

    thanks

  • Ashwin JotForm Support
    Replied on July 1, 2014 at 10:04 PM

    Hello AmSteve,

    Yes that is correct. It is not a simple data POST where you can read the data just by reading the post values. The data will be available in json format.

    If you are using PHP, you need to use json_decode function which will convert json data to array data. Once you have the data in array, you can read it by key / value pair. You will be able to read the data with the field's name.

    We have few webhook examples which you may like to take a look:  http://www.jotform.com/help/248-Webhook-Samples

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!