How can I send POST to multiple URLs at once?

Our website is hosted using EE. I was instructed to add โ€œContact Usโ€ in our form so that it fits into an external sales generation system (hubspot)

We were provided with a URL to publish, and when I finally found the html for the form in question, I noticed that it was already pointing to a different sales management system. I do not want to delete this URL. Can two recordings be done simultaneously?

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" http://yoursite.yourportal.hubspot.com/?app=leaddirector&FormName=X 
+4
source share
2 answers

You cannot do this with a single request. Use XMLHTTP or JQuery.post () objects; with different URLs and the same data. Just send some inquiries. In addition, you can send one request to your server, where PHP can send it to other pages, as well as to other servers, avoiding the same rule as javascript.

+7
source

You can specify your id form and instead of having a btton of type submit, you have a regular button with an identifier (in this example, id is sent), and then use jquery to do something like this with a button click:

 $("button#submit").click(function() { $.post("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8", $("form#id").serialize(), function(data){ //DO something }); $.post("http://yoursite.yourportal.hubspot.com/?app=leaddirector&FormName=X", $('form#id').serialize(), function(data){ //DO something }); }); 
+4
source

All Articles