How can I pass a record type through a Web-to-Case or Web-to-Lead form?
You can use the Web-to-Case or Web-to-Lead forms to designate a specific record type for each of the records submitted through your forms.
By inserting the ID of the record type where you find the Xs below, the record type will automatically be selected upon creation of the record.
<input type=hidden name="recordType" id="recordType" value="XXXXXXXXXXXXXXX">
This will select the record type when the new record is created and will override the default record type of the user it is assigned to. It is recommended to use the 15-character Id of the record type.
Note: To keep the record type on the submitted form make sure that the option Keep the existing record type is selected as your record type setting:
For Leads
In Salesforce Classic: Setup | Customize | Leads | Lead Settings
In Lightning Experience: Setup | Feature Settings | Marketing | Lead Settings
or
For Cases
In Salesforce Classic: Setup | Customize | Cases | Support Settings
In Lightning Experience: Setup | Feature Settings | Service | Support Settings
000385236

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.