1

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!

asked Oct 6, 2015 at 12:30
1
  • 1
    I would suggest using AJAX. You can call sendmail.php with the specified data. When sendmail.php returns a success you can submit the form. (All in jQuery) Commented Oct 6, 2015 at 12:40

1 Answer 1

2

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.

answered Oct 6, 2015 at 12:32
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.