+ Start a Discussion
alchemyalchemy 

web to lead

using the web to lead concept i am trying to create a new lead...

the page is working fine but the new lead that i am creating using the website dat is not coming on my sales force page...

can i get some solution to this problem....

am i supposed to create a separate code to send the data from the html code to the salesforce lead...

i am just using the html code that is generated using the web to lead concept.....

bob_buzzardbob_buzzard

That should work straight out of the box.  One wrinkle though - if you generate the HTML from a sandbox, it will point at a production servlet, so you'd need to change the target of the form to be the sandbox instance servlet instead.

alchemyalchemy

can i get an example please....

bob_buzzardbob_buzzard

When you generate the HTML in the sandbox, the form will start with the following HTML:

 

<form id="contactForm" action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"

This points to the production web to lead servlet, but the oid that is encoded elsewhere in the form will point to your sandbox org, so the leads will be dropped.

 

You'll need to change this to reflect the sandbox instance you are running on, e.g.

 

<form id="contactForm" action="https://cs4.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"

 If this doesn't help, there are a couple of hidden fields in the form that are commented out - debug and debugEmail.  If you uncomment the debg input, that will take you to a page showing the result of the submission to the servlet.

alchemyalchemy

thanks for the help....

its working now...... 

is there any way that i can create an account.... put the values entered in web into my salesforce account object...

bob_buzzardbob_buzzard

You'd probably do better to use Visualforce in conjunction with an unauthenticated force.com site for that.  Otherwise I suspect you'd have to specify a value in the form that indicated it should be an account and convert the lead as soon as it was created through Apex code.