Skip to main content
All CollectionsSalesforce How-Tos and Best Practices
Creating a Web-Lead Form in Salesforce
Creating a Web-Lead Form in Salesforce

This article will walk you through how to generate and setup a web-lead form to sync leads directly from your website back to Salesforce

Andrew Tzikas avatar
Written by Andrew Tzikas
Updated over a week ago

How to Generate a Web-to-Lead Form in Salesforce Setup

Web-to-Lead forms in Salesforce are a great way to capture lead information directly from your website and automatically create leads in Salesforce. In this guide, we will walk you through the steps to generate a Web-to-Lead form in Salesforce Setup.

Step 1: Create the Web-to-Lead Form

  1. Log in to Salesforce and navigate to Setup by clicking on the Gear icon in the upper right corner of the page.

  2. In Setup, navigate to the Leads section by typing “Leads” in the Quick Find search box and selecting “Web-to-Lead.”

  3. On the Web-to-Lead page, click on the “Create Web-to-Lead Form” button.

  4. In the “Create Web-to-Lead Form” page, you can customize the form fields that you want to include in your Web-to-Lead form. You can select the standard fields such as First Name, Last Name, Email, Phone, etc. or create custom fields if needed.
    Note: These fields should match the order that they are collected on your website

  5. After selecting the fields, click on the “Generate” button to create the HTML code for your Web-to-Lead form.

Step 2: Embed the Web-to-Lead Form on your website

  1. Copy the generated HTML code for your Web-to-Lead form.

  2. Navigate to the page on your website where you want to embed the Web-to-Lead form.

  3. Paste the HTML code into the HTML editor for the page.

  4. Save the changes and publish the page.

Step 3: Test the Web-to-Lead Form

  1. Navigate to the page on your website where the Web-to-Lead form is embedded.

  2. Fill out the form with test lead information and submit the form.

  3. After submitting the form, check your Salesforce account to ensure that the lead was created successfully.

Note: Web-to-Lead forms can be vulnerable to spam and malicious attacks. To protect your Salesforce account, consider adding reCAPTCHA to your Web-to-Lead form to verify that the submission is not from a robot or malicious source.

Did this answer your question?