How do you send a website form to Salesforce?
You send a website form to Salesforce in one of four ways: Salesforce's Web-to-Lead, an automation tool such as Zapier or Make, a small server function that calls the Salesforce API, or Account Engagement form handlers if your org uses them. For a Webflow or Framer marketing site, the choice depends on how much control you need over validation, errors and attribution.
Settle the form itself first. Our hub guide to calls to action covers where it sits, and our landing page form guide covers which fields to ask for.
Option | Setup effort | Error handling | Attribution | Best for |
|---|---|---|---|---|
Web-to-Lead, direct post | Low | None visible to you or the visitor | Hidden fields only | Simple contact and demo forms |
Automation tool | Low to medium | Task history and alerts | Hidden fields passed through | Teams without a developer |
Server function and API | Medium to high | Logged, retried, alerted | Full control | High-value or high-volume forms |
Account Engagement form handler | Medium | Depends on setup | Ties to prospect tracking | Orgs already on Account Engagement |
What is Salesforce Web-to-Lead and when is it enough?
Web-to-Lead is a Salesforce feature that generates an HTML form which creates a Lead record when someone submits it. An admin turns it on in Setup, picks the lead fields to include and generates the code. The form posts to Salesforce with your org ID in a hidden oid field and a return URL that sends the visitor back to your site.
It's enough when the form is simple, volume is modest and someone checks that leads keep arriving. Leads created this way go through your lead assignment rules and can trigger Web-to-Lead auto-response rules, so routing and the first reply can live in Salesforce. Custom fields appear in the generated code under their Salesforce field IDs rather than readable names, which matters when you rebuild the form in Webflow or Framer.
How do you connect Webflow forms to Salesforce Web-to-Lead?
Connect a Webflow form to Web-to-Lead by pointing the form's action at the URL in Salesforce's generated code, setting the method to POST and renaming each field to match Salesforce's field names. Webflow then sends the submission straight to Salesforce instead of storing it.
Generate the Web-to-Lead code
Ask your Salesforce admin to generate a form with every field you need, including custom fields for UTMs, and a return URL pointing at your thank-you page.
Set the form action
In Webflow, select the Form Block, open its settings, paste the action URL from the generated code and set the method to POST.
Match field names
Give each input the exact name from the generated code: first_name, last_name, email, company and the ID-style names of custom fields. Dropdown values must match Salesforce picklist values exactly.
Add hidden inputs
Inside the form, use a Code Embed for the oid and retURL hidden inputs, plus hidden UTM inputs filled by a short script.
Protect it
Add the reCAPTCHA from the generated code or a honeypot field, and keep Webflow's spam settings on where they still apply.
Publish and test
Submit from a staging URL with UTM parameters, then find the lead in Salesforce and check every field, the owner and the source.
The trade-off is that Webflow no longer keeps a copy of the submission, so a failed Salesforce write leaves no backup. If you want both, keep Webflow's own handling and forward each submission from a form webhook to an automation tool or a function. Our Webflow development work covers this setup.
How do you send Framer form submissions to Salesforce?
Send Framer form submissions to Salesforce through a webhook: point the form's Send To setting at an endpoint, and have that endpoint create the lead. Framer's native forms send submissions to destinations such as email, Google Sheets or a webhook, and Salesforce isn't one of them.
The endpoint can be an automation tool's catch hook or a small serverless function you host. A function can either convert the JSON into a Web-to-Lead post or call the Salesforce API with an integration user, which gives you real error responses. Framer's webhook documentation describes signed requests, a submission ID header and retries on failure, so check the signature, ignore repeated IDs and return a success status only once Salesforce has accepted the lead.
You can also paste Salesforce's generated HTML into a Framer Embed. It works for simple forms, but you lose Framer's form styling, and you should test where the return URL redirect lands before relying on it. Our Framer development team usually prefers the webhook route for demo forms.
Hypothetical example: a Framer demo form feeding Salesforce
For example, suppose a startup's Framer site has a demo form with name, work email, company and team size, plus hidden-style inputs for utm_source, utm_medium, utm_campaign and the landing page, filled by a small code override.
The form's webhook points at a serverless function. The function checks the Framer signature, drops a submission ID it has already processed, maps team size to the Salesforce picklist values, and creates a Lead through the API with the UTMs in custom fields and Lead Source set to Web. If Salesforce rejects the record, the function logs the payload, posts an alert to the team's Slack channel and returns an error so Framer retries. The sales team gets the lead in their assignment queue, and marketing can report on the campaign.
Should you use Zapier, Make or the Salesforce API?
Use Zapier or Make when nobody on the team writes code and volume is modest; use the Salesforce API from your own function when the form drives pipeline and failures cost money. Both beat a direct Web-to-Lead post on visibility, because you can see when a write fails.
Pros
- Automation tools need no code and show a history of every run
- They can update Salesforce and alert Slack or email in one flow
- The API lets you check for an existing lead or contact before creating one
- A function can validate data and block spam before Salesforce sees it
Cons
- Automation tools add a monthly cost that grows with submissions
- Field mappings break quietly when someone renames a Salesforce field
- The API route needs an integration user and an app set up by your admin
- Someone has to own the function after launch and watch its alerts
If your org uses Account Engagement, formerly Pardot, its form handlers accept posts from your own form and tie them to its visitor tracking. If HubSpot runs alongside Salesforce, the form often belongs in HubSpot first.
How do you map attribution fields to Salesforce leads?
Map attribution by creating custom lead fields for UTM source, medium, campaign and landing page, adding matching hidden inputs to the form, and filling them on the page. Salesforce doesn't read your site's cookies or URL, so anything you don't send as a field is lost.
- Store UTMs on arrival. Visitors often land on one page and convert on another, so save the parameters for the session and write them into the form wherever it appears.
- Set Lead Source consistently. Send a fixed value that matches your Lead Source picklist, and keep the detail in the UTM fields.
- Add campaign membership if marketing reports on Salesforce campaigns, so web leads join the right campaign.
- Capture the landing page and referrer for leads with no UTMs, so organic and direct traffic aren't a blank.
- Agree the mapping in writing with your Salesforce admin, including picklist values and required fields.
How do you test a website form to Salesforce before launch?
Test by submitting every form as a real visitor would, from a tagged campaign link, and checking the resulting lead in Salesforce field by field. A test that only checks the thank-you page proves nothing, because the redirect happens either way.
- Submit from a URL with UTM parameters after visiting two or three pages, then confirm the UTMs, landing page and Lead Source on the lead.
- Check the owner and campaign against your assignment rules.
- Try each picklist value and a missing optional field.
- Submit a duplicate email and see what your duplicate rules do.
- Test on a phone and with an ad blocker on, since blocked scripts can empty hidden fields.
- Set a zero-leads alert so someone hears within a day if submissions stop.
Then check the visitor's side: our guides to the thank-you page, conversion microcopy and rage clicks and form abandonment cover confirmations, errors and drop-off.
Which Salesforce form setup should you choose?
Choose a direct Web-to-Lead post from Webflow for simple forms with modest volume, an automation tool when there's no developer, and a server function calling the Salesforce API for demo forms that drive pipeline, on either platform.
