In this Salesforce tutorial, we will learn how to generate web-to-case HTML in Salesforce. Also, we will understand the steps of generating web-to-case HTML in Salesforce Lightning and the steps of generating a web-to-case HTML in Salesforce Classic.
The web-to-case generates an HTML code that can immerse into the website, permitting customers to fill out the form and after filling out submit the form directly from our website.
While working with an organization that uses Salesforce, I got a task where I needed to generate a web-to-case HTML in Salesforce. To fulfill this requirement I use the web-to-case HTML generator object that is present under the Feature settings under the Service.
So after looking at the multiple solutions, I found a solution that helped me to generate a web-to-case HTML in Salesforce. If you want to learn how to generate a web-to-case HTML in Salesforce Lightning as well as Salesforce Classic, you have come to the right place.
The following are the topics that we will cover in this salesforce tutorial:
- Generate Web-to-case HTML in Salesforce
- How to generate web-to-case HTML in Salesforce Lightning
- How to generate web-to-case HTML in Salesforce Classic
Generate Web-to-case HTML in Salesforce
In Salesforce generating a web-to-case HTML permit us to gather the information from customers who can submit the case along our website.
This generated web-to-case HTML form can be adjusted to involve the fields that we want to gather the information and this information can be inserted in our website by simply using the HTML code.
This form can be edited to gather the particular information that you need from the customers like the customer contact details, the nature of their inquiry or issue, or any other applicable information.
The web-to-case generates an HTML code that can immerse into the website, permitting customers to fill out the form and after filling out submit the form directly from our website. And this filling information inside the form is automatically captured as a new case in our salesforce account.
This information also permits us to expertly manage and trace customer inquiries and issues. We can easily generate a web-to-case HTML form in Salesforce and also gather valuable customer information through our website.
In this way, we have learned about generating a web-to-case HTML form in Salesforce. Now, let’s move further and see how to generate a web-to-case HTML form in Salesforce. We will explore both the salesforce experiences: Salesforce Lightning and Salesforce Classic.
How to generate web-to-case HTML in Salesforce Lightning
Here we are generating a web-to-case HTML in Salesforce Lightning. If you want to learn how to generate a web-to-case HTML in salesforce lightning follow these steps:
Step-1: Login into your Salesforce lightning account, Go to the gear icon. Under the gear icon, there are two options present first one is Setup and another one is Service Setup. Here we are clicking on the Setup option.

Step-2: After clicking on the setup, the setup page is open. Enter a Web-to-Case HTML Generator in the Quick Find Box and the Web-to-Case HTML Generator object comes at the top. Click on the Web-to-Case HTML Generator. And these case auto-response rules are present under Feature Settings.

Step-3: After clicking on the web-to-case HTML generator option, the web-to-case HTML generator settings page is open. Here we are capturing case information from our website.
First for capturing the cases select the cases from the available list and add the cases to the selected field here we have selected the contact name, email, phone, status, and description.

Step-4: After selecting the fields, now scroll to the bottom of the page. Here we can see that the visible in self-service portal checkbox is checked by default and then enter the URL that the user will be returned to. Here we are entering our website link. After filling in the link click on the generate button that is present at the bottom of the page.
After filling out the form and clicking on the submit button this button redirects us to our website Salesforcefaqs.com.

Step-5: After clicking on the generate button, the HTML code is generated. Copy and Paste this sample HTML code from here and then click on the finish button that is present under the HTML code.

Step-6: After copying the HTML code from the capture cases and pasting this code to the notepad. Here we can see that the original name and link of the website that we are entering in the link field are seen as a value.
After that here we can also see the labels of the form. The first label names, the second one is email, the third one is a phone, the fourth one is status, and the fifth one is a description.
And in the end, we can see that a submit button is also created with the help of this HTML code and this submit button redirects us to the link of the website that we are entering in the URL field.
Now save this HTML code to this notepad by simply clicking on the save option that is present under the file. And we can save this HTML file as webtocase.html.

Step-7: This HTML file is saved on the desktop and we are giving the name of this file as webtocase.

Step-8: After saving the HTML code to the desktop, right-click on that and then click on the open with option. The anther list is open now select the browser where you want to open the form. We are clicking on Google Chrome you can select any of the browsers.

Step-9: After clicking on the google chrome browser, you can see that we are moving to the google chrome browser, and the form is generating with the labels and the submit button.

Step-10: Now fill out the form, firstly fill in the contact name as Kaela Jakubowski after that fill in the email then fill in the phone number, and after that fill in the status. After clicking on the drop-down arrow of the status field, the drop-down list is open. Select the option from the list here we are selecting the working option.
After that enter the description inside the description field. Here we are writing this is web to case HTML form and then clicking on the submit button.

Step-11: After clicking on the submit button this submit button redirects us to our website that URL we are entering in the URL field. Here you can see that the Salesforcefaqs.com website is open.

In this way, we understand how to generate a web-to-case HTML in Salesforce Lightning. Let’s Proceed further and learn how to generate a web-to-case HTML in Salesforce Classic.
Read How to Setup Case Escalation Rule in Salesforce
How to generate web-to-case HTML in Salesforce Classic
Here we are generating a Web-to-Case HTML in Salesforce Classic. If you want to learn how to generate a Web-to-Case HTML in Salesforce Classic follow these steps:
1: First log in to the Salesforce account, when we log in to the account the Salesforce lightning edition is open. Moving to Salesforce Classic, click on the Profile picture.
The Profile picture drop-down list is open. Under this profile picture list, there is an option to switch to Salesforce Classic. Click on it.
After clicking on the switch to Salesforce Classic option, click on the drop-down arrow of the username. The drop-down list is open, under this list Setup option is present below the My Profile option. Click on the Setup.

2: After clicking on the setup, the setup page is open. Enter a Web-to-Case HTML Generator in the Quick Find Box and the Web-to-Case HTML Generator object comes at the top. Click on the Web-to-Case HTML Generator. And these case auto-response rules are present under Feature Settings.

3: After clicking on the web-to-case HTML generator option, the web-to-case HTML generator settings page is open. Here we are capturing case information from our website.
First for capturing the cases select the cases from the available list and add the cases to the selected field here we have selected the contact name, email, phone, Priority, and company.

4: After selecting the fields, now scroll to the bottom of the page. Here we can see that the visible in self-service portal checkbox is checked by default and then enter the URL that the user will be returned to. Here we are entering our website link.
After filling out the form and clicking on the submit button this button redirects us to our website google.com. After filling the link click on the generate button that is present at the bottom of the page.

5: After clicking on the generate button, the HTML code is generated. Copy and Paste this sample HTML code from here and then click on the finish button that is present under the HTML code.

6: After copying the HTML code from the capture cases and pasting this code to the notepad. Here we can see that the original name and link of the website that we are entering in the link field are seen as a value.
After that here we can also see the labels of the form. The first label names, the second one is email, the third one is a phone, the fourth one is a priority, and the fifth one is a company.
And in the end, we can see that a submit button is also created with the help of this HTML code and this submit button redirects us to the link of the website that we are entering in the URL field.
Now save this HTML code to this notepad by simply clicking on the save option that is present under the file. And we can save this HTML file as webform.html.

7: This HTML file is saved on the desktop and we are giving the name of this file as webform.html.

8: After saving the HTML code to the desktop, right-click on that and then click on the open with option. The anther list is open now select the browser where you want to open the form. We are clicking on Google Chrome you can select any of the browsers.

9: After clicking on the google chrome browser, you can see that we are moving to the google chrome browser, and the form is generating with the labels and the submit button.

10: Now fill out the form, firstly fill in the contact name as Kadin Mueller Ph.D. after that fill in the email then fill in the phone number, and after that fill in the Priority. After clicking on the drop-down arrow of the status field, the drop-down list is open. Select the option from the list here we are selecting the working option.
Now enter the name of the company inside the company field. Here we are entering the name as Murray LLC and then clicking on the submit button.

11: After clicking on the submit button this submit button redirects us to our website that URL we are entering in the URL field. Here you can see that the Google.com website is open.

So, with this, we have learned how to generate web-to-case HTML in Salesforce Classic.
Conclusion:
Here we have learned about generating a Web-to-Case HTML in Salesforce. We have also discussed how to generate a Web-to-case HTML in Salesforce.
The generated web-to-case HTML form can be adjusted to involve the fields that we want to gather the information and this information can be inserted in our website by simply using the HTML code.
Moreover, we have learned that both Salesforce Lightning, as well as Salesforce Classic, gives a simple and easy way to determine how to generate a Web-to-Case HTML in Salesforce.
In addition to this, the following are the topics that we have discussed in this blog:
- Generate Web-to-case HTML in Salesforce
- How to generate web-to-case HTML in Salesforce Lightning
- How to generate web-to-case HTML in Salesforce Classic
You may also like to read the following articles:
- How to Create Web-to-Case in Salesforce
- Add Image to Email Signature in Salesforce
- How to Create Case Escalation Rule in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.