Code Sample to Send Form Data to a PHP Script with Webhooks

  • Profile Image
    John Dikmen
    Asked on July 09, 2013 at 11:40 AM

    Same question here. I have two new web sites getting ready to go online using Jotforms and both clients have been asking for this exact functionality, but I am not a PHP Programmer.

    Do you have example code on how to implement this?



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

  • Profile Image
    aytekin
    Answered on July 09, 2013 at 11:41 AM

    What exactly do you want to do on the php script? If you can describe we can try to provide a code sample. 

  • Profile Image
    choreo
    Answered on July 09, 2013 at 03:52 PM

    At this point I think my clients would be happy with almost anything that they could manipulate in something like Excel on their end. The complaint I have received in the past is that they get a bunch of individual emails over time and they have to cut and paste information. I think "ideally" they would prefer some way to go to a URL to see a spreadsheet of all emails they have received over time and be able to download that information as a single spreadsheet file at different points in time if that is possible?

    Thanks!

  • Profile Image
    EltonCris
    Answered on July 09, 2013 at 08:38 PM
    Hi,
     
    Here's an example PHP script that you may try on Webhook.
    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, 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 perfectly on 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/.

    ---------------------------------------------
    Regarding on your second concern, JotForm has that feature if I get it right. We have Grid Listing and HTML Table Listing Report available where you can embed and view submissions results using the provided report URL. You can also deselect fields so it's not included on the report in case you want to display emails only. 

    It is also possible to download form submissions to your desired format, Excel, CSV, PDF. How to Download Form Submissions to Excel/CSV/PDF.
     
    Let us know if you have further questions. Thanks!
  • Profile Image
    MikePreston
    Answered on March 14, 2014 at 05:34 AM

    I tried to clone the form, as instructed above, and it failed with a message of: no source found.  Has cloning functionality changed since this was first posted?

  • Profile Image
    Welvin
    Answered on March 14, 2014 at 09:30 AM

    Please kindly try it again using the following link: http://www.jotformpro.com/form/31840709231954. Follow this guide: How to clone an existing form from a URL

    Thanks

  • Profile Image
    MikePreston
    Answered on March 14, 2014 at 12:05 PM

    Those are the exact steps that I followed the first time.  Nonetheless, I did them again at your request and the message is the same:

     

    No form found on the page. Please check the source code you provided

     

    https://www.wuala.com/MikePreston/JotFormPublic/?key=JotForm123

  • Profile Image
    Jeanette
    Answered on March 14, 2014 at 03:22 PM

    This is the form to be cloned:

    http://www.jotformpro.com/form/31840709231954

    If you open the clone with no problem, but you cannot clone it let us know.

  • Profile Image
    MikePreston
    Answered on March 14, 2014 at 04:09 PM

    Jeanette, what you describe is exactly what is going on.  I *can* open the formm so I see that there are three fields and a submit button.  I can *NOT* clone it.  Please look at the screen shot which I've located on the web at:

    https://www.wuala.com/MikePreston/JotFormPublic/?key=JotForm123

    It shows that I have input the url correctly and it shows the error message.

    I feel like I'm in a bad conversation with my wife. She doesn't believe me unless I say or do things three times, either.


  • Profile Image
    pinoytech
    Answered on March 14, 2014 at 06:30 PM

    Hi,

    I've added the said form in your account for you. Kindly re-login to your account to see the form.

    Feel free to contact us again if you need further assistance.