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

How to create a web form that syncs with Salesforce? (newbie)

I'm building a website for a small company that uses Salesforce and they would like to include a "Contact Us" form on their site that submits the user input to Salesforce.

Is this possible?

If so, is there any existing documentation on how to do this?

I searched the Salesforce "Help" section but only found a few brief references to "Web to X" and "Web to Lead" forms...nothing very instructional.

Thanks in advance for your help!


Gareth DaviesGareth Davies
I think you'll find that the best way is to use the web-to-lead.
Enable this by going to
Once enabled use the "Generate HTML" link [under same location] and copy the generated code into your web page.
Thanks, Gareth!

I'll give this a try.

Just to be clear: do you mean the "setup" link in the upper-right corner? I think I have limited access so I don't see a "Leads" option once I click this. I can check with the admin if needed.

Gareth DaviesGareth Davies
Yep Setup top right, though I mislead you with the sequence (sorry, memory has gone!)

It's shocking that this information is not in the "help" files but this is exactly what I'm looking for.

Much appreciated,

Gareth DaviesGareth Davies
to be fair the manual is not bad if you know what  you are looking for - but finding what to look for is an issue. I first learned about the possibility from Tom Wong's book for dummies.
There are another two (pamphlet style) booklets that you can probably track-doen for free
"Appexchange for Dummies" and " for Smarties "  - try asking your CSM to see if they can locate for you.
The following is typing "Web-to-lead" into the help system, it hyper links out to other good resources.
Available in: Professional, Enterprise, Unlimited, and Developer Editions

User Permissions Needed
To set up Web-to-Lead:  "Customize Application"

With Web-to-Lead, you can gather information from your company’s website and automatically generate up to 500 new leads a day.

Your company may already have a registration or other type of page where users enter their contact information. You may also want to create a jump page where prospects respond to a campaign. With a little extra HTML code, you can redirect that information to Salesforce to create new leads.

See Preparing to Set Up Web-to-Lead for the steps to prepare for setting up Web-to-Lead.

See Setting Up Web-to-Lead for the steps to set up Web-to-Lead.
See Also:
Managing Assignment Rules
Managing Queues
Customizing Lead Settings
Assigning Leads
Displaying and Editing Leads
Creating Leads
Converting Leads
Setting Up Auto-Response Rules
Good point. Now that I know that what I am looking for is "web-to-lead" then the "help" documentation is clear.

I've also been able to find some helpful threads on this site. Great forum!

One problem with this is that Web2Lead only inserts new records and only for Leads. So, in the first case, you'll get duplicate Leads everytime a person submits a form. Second, I don't see functionality for updating or inserting a Contact record.

So my question for SF would be: is it advisable to use the AppExchange API to do insert/updates to Lead and Contact objects everytime a web form on our site is completed. This would require a separate login/merge/logout API transaction for every form which might number in the 100s or 1000s per day. Or is it recommended that the best way is do synchronization of SF with web form-collected data on a scheduled basis (30 mins or hourly, etc.) and how tight a frequency is acceptable.


To solve your lead duplicated problem, you should try to use FormVester for AppExchange instead of the default salesforce, web2lead functionnality. The application allows to generate new leads in salesforce from any of you existing online forms (simply insert a javascript snipet code in your website pages). FormVester has a deduplicate function, so that it always checks if the lead already exists in salesforce before generating it. If the lead already exists, the lead is simply updated.

Hope it can help. - Look for FormVester in the AppExchange.

Gary RalstonGary Ralston
Hi bearclaws,

Salesforce provides various options for creating dynamic web forms based on specific needs, desired level of customization, and desired functionality. There are multiple methods for creating a web form including :
  • Lightning App Builder : This is a point-and-click tool that allows you to create custom pages, including forms, for your Salesforce org.
  • Web-to-lead : This is built in functionality which used to capture the leads from your website and save in Salesforce.
  • Visualforce Pages : This is a markup language that enables you to create custom pages using HTML, CSS, and Apex code.
  • Custom Lightning Components : This is a framework for building reusable UI components using HTML and JavaScript.
  • Third-party tools : There are several third-party tools available that allow you to create forms in Salesforce, such as Form Assembly, Gravity form and more.
For a complete guide to create web form in salesforce, visit at, this article provide complete information to create dynamic web form in salesforce using gravity form.