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

    Webhook PHP Script Example

    Asked by Winston Negron on July 06, 2013 at 09:14 AM

    This is will simplify things for me and my websites where I need feedback. All I have to do now is set up a "PHP" scheme. Do you by any chance have any sample code for this? This would be great and save me time.



    This is a re-post of a comment on Send Instant Submission Notifications with Webhooks

  • Profile Image
    JotForm Support

    Answered by EltonCris on July 06, 2013 at 11:23 AM

    Hi Winston,

    We will get back to you with this with an example. We will provide it to you later today.

    Thanks for using JotForm!

  • Profile Image

    Answered by Winston on July 06, 2013 at 12:52 PM
    I'm really grateful for your time and effort.

    _____
  • Profile Image
    JotForm Support

    Answered by EltonCris on July 07, 2013 at 07:59 PM

    @Winston

    My apologies for getting back to you so late. Here's an example PHP script that you may try on WebHook.

    http://pastebin.com/raw.php?i=1SZyZ4uM

    This is a simple mail sender script that sends the form data to your email. You have to replace the two emails found on the script with your email, sender and recipient.

    To test, submit a sample data on this form to received a notification containing your submitted data. http://form.jotformpro.com/form/31840709231954?. Make sure to use your real email.

    That code works with this form: http://form.jotformpro.com/form/31840709231954?, you can clone this form and setup a webhook on the cloned form.

    For your reference, if you're going to setup webhook on your forms, you can easily inspect HTTP request using http://requestb.in/.

    Let us know if you have further questions. Thanks!

  • Profile Image
    JotForm Support

    Answered by EltonCris on July 08, 2013 at 03:59 AM

    Sorry, my first script was deleted on that page for some reason. Get it here instead: http://pastebin.com/raw.php?i=1SZyZ4uM

    Thanks!

  • Profile Image

    Answered by Eric on November 13, 2013 at 03:41 PM
    When it comes to Webhooks, I can't seem to get them working. Is the code you posted (http://pastebin.com/raw.php?i=1SZyZ4uM) the ONLY code you need in the PHP file you point to for your webhook? Or is there any other authentication or processing that needs to happen in that file? I'm totally new to the whole webhook process. Thanks!
  • Profile Image
    JotForm Support

    Answered by ardy0689 on November 13, 2013 at 05:28 PM

    Hello Eric, thanks for posting your inquiry.

    However, please create a separate thread so that we can focus on your inquiry and to avoid any confusion and long threads. You can use this link to create a new thread http://www.jotform.com/answers/answer.php

    Thank you.