Loading

Add additional fields to the Standard Web-to-Lead form

Date de publication: Oct 13, 2022
Description


Additional fields can be added to the standard web-to-lead form with the following modifications.

Résolution


Salesforce can automatically create Leads based on information captured directly on your website.
 

Step 1: Create a new Lead custom field to capture the new information

  1. Navigate to:
  • In Salesforce Classic: Your Name  | Setup | App Setup | Customize | Lead | Fields.
  • In Lightning Experience: Gear icon | Setup | Object Manager | Lead | Fields and Relationships
  1. Scroll down and click New button next to Lead Custom Fields.
  2. Enter the Data type for the field and the appropriate label for the field. 
  3. Click Save.
  4. Optionally, map this lead field to Accounts, Contacts, and Opportunities if the lead is converted. To update the mapping, click the link Map Lead Fields located next to 'New'. This will ensure that the information is retained when the lead is subsequently converted.

 

Step 2: Generate the sample HTML code for this new field

  1. Navigate to:
  • In Salesforce Classic: Your Name  | Setup | App Setup | Customize | Leads | Web-to-Lead
  • In Lightning Experience: Gear icon | Setup | Feature Settings | Marketing | Web-to-Lead
  1. Click Create Web-to-Lead Form.
  2. Select only the Lead field you just created from 'Available Fields' to 'Selected Fields' box.
  3. In 'Return URL': you can add a link that will redirect you after you after the web to lead for submission.

    The "Return URL" value that we are setting is what the user gets normally redirected to, that mean if you set return URL as www.salesforce.com, after user submit the web to lead form, user will redirect to www.salesforce.com
  4. Click Generate.
  5. Select all the text in the text box and copy and paste in on Notepad, or any clipboard you can store this. Alternatively,
  6. Paste it on Notepad.
  7. On the Menu Bar, click on File.
  8. Click Save As.
  9. Save it as HTML file by adding ".html" after the name of the file (webtolead.html)
  10. On the 'Save as type' drop-down, select All Files.
  11. Right-click the file, choose Open With and select your desired browser (e.g. Chrome).

Note: This method allows testing to verify the new added field will be included on the form and verify upon submitting the form, Leads will be created in the organization based from the information entered.


Step 3: Incorporate the new HTML into your web site

  1. Paste the HTML you copied into an email and send it to your webmaster.
  2. Your webmaster will need to add the input elements in this sample HTML into your website. They will also likely want to customize the look and feel to match that of your web site.
Numéro d’article de la base de connaissances

000385435

 
Chargement
Salesforce Help | Article