How to create web-to-lead in Salesforce | How to Generate Leads from Your Website in Salesforce | How to create web-to-lead form html code in Salesforce | How to set lead source as website in Web-to-lead Salesforce


Hey guys, today in this post we are going to learn How to Generate Leads from Your Website and set lead source as website by default in Salesforce.

Automatically generate up to 500 leads per day with the prospecting data from your company’s website visitors. When you set up Web-to-Lead, Salesforce captures prospects who provide contact information. You can also redirect prospects to other web pages that are critical to campaign success. To know more detail, Click Here.



Final Output →

how to create web-to-lead in salesforce --


You can download file directly from github by Click Here.


Other related post that would you like to learn in Salesforce


  • Find the below steps ▾


Create HTML

Step 1:- Quick Find box >> then select Web-to-Lead >> To enable or change Web-to-Lead setting >> click Edit

Save the Html Page:- leadCreation.html

leadCreation.html [HTML page]

  2.    <!--  ----------------------------------------------------------------------  -->
  3. <!--  NOTE: Please add the following <META> element to your page <HEAD>.      -->
  4. <!--  If necessary, please modify the charset parameter to specify the        -->
  5. <!--  character set of your HTML page.                                        -->
  6. <!--  ----------------------------------------------------------------------  -->
  8. <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
  10. <!--  ----------------------------------------------------------------------  -->
  11. <!--  NOTE: Please add the following <FORM> element to your page.             -->
  12. <!--  ----------------------------------------------------------------------  -->
  14. <form action="" method="POST" style="padding:10px;">
  16. <input type=hidden name="oid" value="00D5g000007oJsa">
  17. <input type=hidden name="retURL" value="">
  19. <!--  ----------------------------------------------------------------------  -->
  20. <!--  NOTE: These fields are optional debugging elements. Please uncomment    -->
  21. <!--  these lines if you wish to test in debug mode.                          -->
  22. <!--  <input type="hidden" name="debug" value=1>                              -->
  23. <!--  <input type="hidden" name="debugEmail"                                  -->
  24. <!--  value="">                                      -->
  25. <!--  ----------------------------------------------------------------------  -->
  27. <label for="first_name" style="width:100px; display:inline-block;">First Name</label><input  id="first_name" maxlength="40" name="first_name" size="20" type="text" /><br><br>
  29. <label for="last_name" style="width:100px; display:inline-block;">Last Name</label><input  id="last_name" maxlength="80" name="last_name" size="20" type="text" /><br><br>
  31. <label for="email" style="width:100px; display:inline-block;">Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" /><br><br>
  33. <label for="company" style="width:100px; display:inline-block;">Company</label><input  id="company" maxlength="40" name="company" size="20" type="text" /><br><br>
  35. <input type="hidden" id="If_Source_Website__c" name="If_Source_Website__c" value="True"><br>
  37. <input type="hidden" id="Status" name="Status" value="Open - Not Contacted">
  39. <label style="width:100px; display:inline-block;"></label><input type="submit" name="submit">
  41. </form>

how to create web-to-lead in salesforce --

Further post that would you like to learn in Salesforce



FAQ (Frequently Asked Questions)

How do I create a Web to lead in Salesforce?

From Setup, enter Web-to-Lead in the Quick Find box, then select Web-to-Lead. To enable or change Web-to-Lead settings, click Edit. Optionally, select Require reCAPTCHA Verification to reduce spam and reject leads without verification. In orgs created after Winter '19, this setting is enabled by default.

When you create a web to lead form in Salesforce?

Salesforce lets you easily create web-to-lead forms that capture information about visitors to your website. The information is automatically stored in new lead records in your Salesforce install, and the lead can then be scored, qualified, and routed to sales reps.

What is Web to lead and Web-to-case in Salesforce?

Web-to-Lead or Web-to-Case functions are tools that automatically capture leads or cases from a website external to Salesforce to create a lead or case record directly in Salesforce. These tools are used to generate a Webform in HTML format with the Salesforce fields that retrieve the information from the record.

Related Topics | You May Also Like


Our Free Courses →

👉 Get Free Course →

📌 Salesforce Administrators

📌 Salesforce Lightning Flow Builder

📌 Salesforce Record Trigger Flow Builder

👉 Get Free Course →

📌 Aura Lightning Framework

📌 Lightning Web Component (LWC)

📌 Rest APIs Integration

Hi, This is Vijay Kumar behind the admin and founder of I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | | The Sitemap where you can find all published post on

Leave a Comment