How to Connect an HTML Form to Salesforce CRM
You can automatically create Salesforce leads from HTML form submissions by using Forminit as the form backend and Zapier as the bridge. Every time someone fills out your form, a new lead is created in Salesforce CRM - no server-side code or Salesforce Web-to-Lead forms needed.
TL;DR: Connect your HTML form to Salesforce by using Forminit as the form backend and Zapier as the bridge. Every new form submission automatically creates a lead in Salesforce - no server-side code or Salesforce Web-to-Lead forms needed.
This is a better alternative to Salesforce’s built-in Web-to-Lead forms, which are limited in styling, lack file upload support, and don’t provide a submission dashboard. With Forminit, you design your own form UI, get server-side validation, file uploads up to 25 MB, and a submission inbox - while Zapier forwards each submission to Salesforce as a new lead.
Forminit is a headless form backend API that receives and stores form submissions from any website or app. Salesforce is a cloud-based CRM platform for managing leads, contacts, and sales pipelines. Together with Zapier, they automate the entire flow from website form submission to CRM lead.
How Do You Create New Salesforce Leads from an HTML Form?
Prerequisite: You need to have at least one form created and one form submission received to your form on Forminit. If you haven’t received your first submission yet, check out the “Collecting form submissions” section on our docs or watch our helper video here to get started.
Step 1: Create Your Form on Forminit
- Sign in to your Forminit account at forminit.com.
- Click the ”+” button to create a new form that we will integrate with Salesforce. Let’s name the form as “Salesforce Lead Form”.
- With that form created, your unique form endpoint is now ready to be inserted into your HTML form. Let’s add our form and start getting our first submissions.
Here is how your HTML form should look like at this point:
<form action="https://forminit.com/f/{your-unique-form-endpoint-goes-here}" method="POST" accept-charset="UTF-8">
<input type="text" name="firstname" placeholder="First Name*" required="required">
<input type="text" name="lastname" placeholder="Last Name*" required="required">
<input type="email" name="email" placeholder="Your Email*" required="required">
<input type="tel" name="phone" placeholder="1-(555)-555-5555">
<input type="text" name="company" placeholder="Doe Co." required="required">
<button type="submit">Submit</button>
</form>
You can copy the Sales Lead Form template to start off and modify it according to your needs if you’d like.
We want to have name, email, telephone and company info to collect as lead details. With a little bit of styling, here is how your Sales Lead Form looks like.
Step 2: Set Up Zapier Integration
-
After we submit to the form, here is how the Forminit form data looks like.
-
On your Forminit dashboard, navigate to the “Integrations” tab under your Form Settings and click “Connect with Zapier” to start setting up our Forminit-Salesforce Zap.
-
Search for Salesforce on the opening screen and go there. Zapier is a great tool to automate your workflows. What we want is to create new sales leads every time a potential lead submits to our form.
-
To be able to do that, on the Zapier page, select “New Submission” on the “When this happens” field and pick “Create Lead” or “Add Lead to Campaign” on the “then do this” field. Then you just need to click the “Try it” button to start setting up the integration.
-
To connect your Forminit account to your zap, just paste the API Key you copied from the “Integrations” tab and click the “Yes, Continue” button. Then we will select our form’s name to connect with our Salesforce account.
Step 3: Connect Salesforce Account
-
After you finish setting up the Trigger step, you just need to click the “Continue” button in the Action stage since Zapier already selected the action app and event for you. Then you need to connect your Salesforce account by signing in on the Zap page.
-
We are almost finished! Let’s set up an action by selecting our Salesforce account. Then you can add your form submission info to the related fields that you created in Salesforce as follows:
- Map
firstnamefrom form submission to First Name field in Salesforce - Map
lastnamefrom form submission to Last Name field in Salesforce - Map
emailfrom form submission to Email field in Salesforce - Map
phonefrom form submission to Phone field in Salesforce - Map
companyfrom form submission to Company field in Salesforce
- Map
-
Now our Zap is ready to test. Let’s click on the “Test & Continue” button and check your Leads section on your Salesforce dashboard.
That’s it! Your HTML form backend that is managed by Forminit is connected to Salesforce to send new leads to your Salesforce Leads section successfully.
Click “Turn on Zap” to finalize the Zap. From now on, your form data can be automatically sent to Salesforce whenever your form is submitted.
Related Resources
- How to Collect HTML Form Submissions on Notion Tables — similar integration for Notion databases
- How to Create an HTML Form That Sends You an Email — set up email notifications for form submissions
- Forminit Documentation — get started with form endpoints and integrations
- Zapier Integration Guide — detailed Zapier setup instructions
If you liked this post, don’t forget to share and follow us on LinkedIn and X for more updates from our blog!
If you have any further queries, reach us out at info@forminit.com.