0

I was wondering if someone could help me with my code.

I am using Saleforce (CRM SYSTEM) to track leads from our site. When people click 'submit' this sends the information and inputs it into Salesforce to track the lead. However I want it so that when people click 'submit' it also sends a copy to myself at Chloe.Smith@finecal.co.uk. I have tried adding another form and changing the submit value but neither seem to work.

Does anyone know how I can just add to the code below (pure HTML) so that it sends all the information to the form action 'salesforce' but also sends it to my email so I have a copy and can reply from my email.

<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00DD0000000Cpsb">
<input type=hidden name="retURL" value="http://www.finecal.co.uk">

<label for="first_name">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br>

<label for="last_name">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br>

<label for="company">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br>

<label for="email">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br>

<label for="phone">Phone</label><input  id="phone" maxlength="40" name="phone" size="20" type="text" /><br>

<label for="description">Inquiry</label><textarea name="description"></textarea><br>

<input type="submit" name="submit">

</form>

Any help is very much appreciated. Thank you.

  • 1
    Wouldn't it be easier to have a Workflow rule in Salesforce to email the new leads to you as they are created? – Dave Humm Jun 23 '16 at 9:36
1

In Web to lead you can not do this but there are workarounds available for you.

1) You can define workflow on Lead object and send email to user when new lead record is created.

2) You can define flow to send email just like workflow

3) You can write trigger on lead and use single email message to send email to user

4) you can define report on lead and schedule it to send email to you every day morning with all leads generated last day

5) One more way to do this by writhing code on your form hosting server. for ex if your form is hosted on IIS on windows server then you can write .net code to accept all form data into your .net controller from there you can email the data to your email id and after that post the data to salesforce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.