function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alex DreskoAlex Dresko 

Web2Lead not working

I'm trying to get the web 2 leads working and the leads are never showing up in salesforce. Also, instead of returning the user to the page that I specified, it returns the user to the same page that the form was on. I am relatively certain that the form is being submitted to salesforce, but I'm not sure what the problem is.

My form looks like this (might be hard to read). You'll notice the submit button does a little bit of 'magic' to get the form to submit to the correct page (darn ASP.NET).

  <form name="Form" method="post" action="/Contact/tabid/58/Default.aspx" id="Form" enctype="multipart/form-data" style="height:100%;">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />

 <span id="dnn_ctr470_HtmlModule_HtmlHolder" class="Normal"><INPUT type=hidden value=00D300000000cPN name=oid> <INPUT type=hidden value=http://www.3pointoh.com name=retURL> Salutation: <SELECT id=salutation name=salutation><OPTION value="" selected>--None--<OPTION value=Mr.>Mr.</OPTION> <OPTION value=Ms.>Ms.</OPTION> <OPTION value=Mrs.>Mrs.</OPTION> <OPTION value=Dr.>Dr.</OPTION> <OPTION value=Prof.>Prof.</OPTION></SELECT><BR>First Name: <INPUT id=first_name maxLength=40 name=first_name><BR>Last Name: <INPUT id=last_name maxLength=40 name=last_name><BR>Title: <INPUT id=title maxLength=80 name=title><BR>Company: <INPUT id=company maxLength=80 name=company><BR>Website: <INPUT id=URL maxLength=80 name=URL><BR>Email: <INPUT id=email maxLength=80 name=email><BR>Phone: <INPUT id=phone maxLength=40 name=phone><BR>Fax: <INPUT id=fax maxLength=40 name=fax><BR>Mobile Phone: <INPUT id=mobile maxLength=40 name=mobile><BR>Description: <TEXTAREA name=description></TEXTAREA><BR>Address: <TEXTAREA name=street></TEXTAREA><BR>City: <INPUT id=city maxLength=40 name=city><BR>State/Province: <INPUT id=state maxLength=20 name=state><BR>Zip: <INPUT id=zip maxLength=20 name=zip><BR>Country: <INPUT id=country maxLength=40 name=country><BR>Lead Source: <SELECT id=lead_source name=lead_source><OPTION value="" selected>--None--<OPTION value=Web>Web</OPTION> <OPTION value="Phone Inquiry">Phone Inquiry</OPTION> <OPTION value="Partner Referral">Partner Referral</OPTION> <OPTION value="Purchased List">Purchased List</OPTION> <OPTION value=Other>Other</OPTION></SELECT><BR>Industry: <SELECT id=industry name=industry><OPTION value="" selected>--None--<OPTION value=Agriculture>Agriculture</OPTION> <OPTION value=Apparel>Apparel</OPTION> <OPTION value=Banking>Banking</OPTION> <OPTION value=Biotechnology>Biotechnology</OPTION> <OPTION value=Chemicals>Chemicals</OPTION> <OPTION value=Communications>Communications</OPTION> <OPTION value=Construction>Construction</OPTION> <OPTION value=Consulting>Consulting</OPTION> <OPTION value=Education>Education</OPTION> <OPTION value=Electronics>Electronics</OPTION> <OPTION value=Energy>Energy</OPTION> <OPTION value=Engineering>Engineering</OPTION> <OPTION value=Entertainment>Entertainment</OPTION> <OPTION value=Environmental>Environmental</OPTION> <OPTION value=Finance>Finance</OPTION> <OPTION value="Food &amp; Beverage">Food &amp; Beverage</OPTION> <OPTION value=Government>Government</OPTION> <OPTION value=Healthcare>Healthcare</OPTION> <OPTION value=Hospitality>Hospitality</OPTION> <OPTION value=Insurance>Insurance</OPTION> <OPTION value=Machinery>Machinery</OPTION> <OPTION value=Manufacturing>Manufacturing</OPTION> <OPTION value=Media>Media</OPTION> <OPTION value="Not For Profit">Not For Profit</OPTION> <OPTION value=Recreation>Recreation</OPTION> <OPTION value=Retail>Retail</OPTION> <OPTION value=Shipping>Shipping</OPTION> <OPTION value=Technology>Technology</OPTION> <OPTION value=Telecommunications>Telecommunications</OPTION> <OPTION value=Transportation>Transportation</OPTION> <OPTION value=Utilities>Utilities</OPTION> <OPTION value=Other>Other</OPTION></SELECT><BR>Annual Revenue: <INPUT id=revenue name=revenue><BR>Employees: <INPUT id=employees name=employees><BR>Campaign: <SELECT id=Campaign_ID name=Campaign_ID><OPTION value="" selected>--None--<OPTION value=7013000000015p1>Greenville Magazine Ad</OPTION> <OPTION value=7013000000018gS>Yellow Pages</OPTION> <OPTION value=7013000000019dd>BBB</OPTION> <OPTION value=7013000000019cG>Ricky Ray</OPTION> <OPTION value=701300000001DqI>Internet Search</OPTION></SELECT><BR><INPUT id=member_status type=hidden name=member_status> Email Opt Out: <INPUT id=emailOptOut type=checkbox value=1 name=emailOptOut><BR>Fax Opt Out: <INPUT id=faxOptOut type=checkbox value=1 name=faxOptOut><BR>Do Not Call: <INPUT id=doNotCall type=checkbox value=1 name=doNotCall><BR>Request Sample Materials: <INPUT id=00N30000000nr2r type=checkbox value=1 name=00N30000000nr2r><BR>Product Interest: <SELECT id=00N30000000laQe multiple name=00N30000000laQe><OPTION value="Media Conversion (eg. VHS to DVD)">Media Conversion (eg. VHS to DVD)</OPTION> <OPTION value="Media Duplication">Media Duplication</OPTION> <OPTION value="Multimedia CDs">Multimedia CDs</OPTION> <OPTION value="Video Production">Video Production</OPTION> <OPTION value=Websites>Websites</OPTION></SELECT><BR><INPUT onclick="document.getElementById('Form').action='http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';" type=submit value="Contact Sales"></span>

 

   <input name="ScrollTop" id="ScrollTop" type="hidden" />
   <input name="__dnnVariable" id="__dnnVariable" type="hidden" />
 </form>

SPowserSPowser

Alex,

 

Did you ever find a solution to this problem?  I seem to be having a very similar issue.

Thanks,

Shane

Mike LeachMike Leach

Take a look at the action attribute within the form element generated by Salesforce. It expects to POST the form back to their servlet, process the lead, and redirect the URL back the page specified.

Web-to-Lead and Web-to-Case HTML generation does not work in .NET for 2 reasons:

1) ASPX pages can only have 1 Form element
2) The post back action in ASPX is controlled natively by ASP.NET

To overcome this, you'll need to publish your Salesforce forms in a regular HTML file or modify the generated HTML to work within the ASPX constraints.

Here's one approach we've taken to convert Salesforce generated HTML into ASP.NET :
http://blogs.cubiccompass.com/MikeBlog/PermaLink,guid,18f4a62a-0fa0-4307-ba5c-16b4ba622617.aspx

It should be available through AppExchange by March 2006 as "i-Dialogue Web Site".

-Mike

JenniferArnoldJenniferArnold
 
I really like this package and it is cheap.
habmanhabman
Web2Lead will work in .NET. 
However, you are limited to using a regular form instead of the server form which will of course limit the functionality available.  That being said, you can still do anything that you could do with an HTML page.  The only disadvantage for me was that I had to do my own validation with javascript instead of relying on the built in .NET validators.
diegartediegarte
Hi Alex;

Setting up the web-to-lead functionality in salseforce might be tricky sometimes, especially if you have complex online forms. The default Salesforce web-to-lead does not allow you to use your own existing webforms, instead you have to use the HTML code generated by Salesforce and paste it into your website. As a consequence using this generated form doesn’t give you a total control and you probably won’t get all the flexibility you could have had with your own forms.

My suggestion here, is to use the FormVester for AppEchange, which does allow you to use your own existing webforms. No matter how complex your webforms are, FormVester will capture all the information and generate it as a new lead in Salesforce. The installation is extremely easy, and you will enjoy great flexibility and features that will surely leverage your web-to-lead efforts!

I hope my advice will help everyone that experiences web-to-lead activation issues with Salesforce. Find FormVester here