Answers.Body: <p>By putting the webhook URL in the action field, you're completely bypassing the Contact Form's processing of the POST request and getting back a JSON response from Zapier.</p>
  
  <p>I believe the correct way to do this would be to write your own custom Craft <a href="http://buildwithcraft.com/docs/plugins/introduction" rel="nofollow">plugin</a> that listens to Contact Form's <a href="https://github.com/pixelandtonic/ContactForm#the-contactformbeforesend-event" rel="nofollow">beforeSend</a> <a href="http://buildwithcraft.com/docs/plugins/hooks-and-events#events" rel="nofollow">event</a>.</p>
  
  <p>When that event gets fired, you can make an AJAX request (using Guzzle or whatever) to Zapier's URL passing in the required fields, get the response back, do with it what you will, then let the Contact Form's controller finish executing and send them email.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-26T21:18:32.673Z
Answers.LastActivityDate: 2014-12-28T06:53:08.933Z
Answers.LastEditDate: 2014-12-28T06:53:08.933Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm still a beginner with PHP so please bear with me. I've installed the Contact Form plugin for Craft by Pixel and Tonic, and have it configured to work as expected. </p>
  
  <p>However, I'd like to have the form also send the data to a Zapier webhook URL so that it will automatically create a lead in my CRM system. </p>
  
  <p>Putting the webhook URL in the "action" field but does send the data correctly to Zapier, but the user goes to a status page (see screnshot below) and the form isn't mailed out to my email. </p>
  
  <p><img src="https://i.sstatic.net/c1ahG.png" alt="Screenshot of status message page."></p>
  
  <p>Any help or suggestions on the best way to accomplish this? </p>
  
Tags: <form><plugin-contactform><hook><post>
Title: Pixel & Tonic's Contact Form Plugin - POST submissions to Zapier Webhook URL?
ThreadText: # Pixel & Tonic's Contact Form Plugin - POST submissions to Zapier Webhook URL?
  
  (Asked by: username_0 on 2014-12-26)
  
  I'm still a beginner with PHP so please bear with me. I've installed the Contact Form plugin for Craft by Pixel and Tonic, and have it configured to work as expected.
  
  However, I'd like to have the form also send the data to a Zapier webhook URL so that it will automatically create a lead in my CRM system.
  
  Putting the webhook URL in the "action" field but does send the data correctly to Zapier, but the user goes to a status page (see screnshot below) and the form isn't mailed out to my email.
  
  ![Screenshot of status message page.](https://i.sstatic.net/c1ahG.png)
  
  Any help or suggestions on the best way to accomplish this?
  
  **Tags:** form, plugin-contactform, hook, post
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-12-26. Score: 2
  
  By putting the webhook URL in the action field, you're completely bypassing the Contact Form's processing of the POST request and getting back a JSON response from Zapier.
  
  I believe the correct way to do this would be to write your own custom Craft [plugin](http://buildwithcraft.com/docs/plugins/introduction) that listens to Contact Form's [beforeSend](https://github.com/pixelandtonic/ContactForm#the-contactformbeforesend-event) [event](http://buildwithcraft.com/docs/plugins/hooks-and-events#events).
  
  When that event gets fired, you can make an AJAX request (using Guzzle or whatever) to Zapier's URL passing in the required fields, get the response back, do with it what you will, then let the Contact Form's controller finish executing and send them email.
  
  
  ---
  
  