TKems
TKems

Reputation: 109

HTML From with multiple actions

I've got a simple HTML/PHP form that people fill out, it sends an email to someone in our office with what they've entered and uploads a file to an FTP site. The <form> tag looks like this:

<form name="contact-form" method="post" action="sendemail.php">

We've recently started using Salesforce and have decided it would be nice to have the form automatically populate salesforce, which helpfully has the functionality to spit out some code for you to use. However it starts:

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

We still want to receive the email, so is there a way to post to sendemail.php and the salesforce webtolead?

Thanks in advance!

Upvotes: 1

Views: 60

Answers (1)

itoctopus
itoctopus

Reputation: 4251

You can't have 2 forms for the same fields. What you can do is you can submit to sendmail.php, and then in sendmail.php you can use curl (there are many examples on curl) to submit to the salesforce website. Not that hard at all to implement.

Upvotes: 2

Related Questions