You are here:
Generate and Test Your Web-to-Case Form
Generate HTML code that can be inserted into your company's website to capture cases in a web form. Whenever someone submits information using the form, a case is created.
Required Editions
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To set up Web-to-Case: | Customize Application |
| To generate Web-to-Case HTML | Customize Application |
- Complete the steps in Prepare for Web-to-Case and Turn On and Customize Web-to-Case.
- From Setup, enter Web-to-Case HTML Generator in the Quick Find box, then select Web-to-Case HTML Generator.
- Select the fields to include on your Web-to-Case form.
- If your organization has a self-service portal and you want web-generated cases to be visible to portal users, select Visible in Self-Service Portal.
- Specify the complete URL to which customers are directed after they submit their information. For example, the URL can be for a “thank you” page or your company's home page.
- If Require ReCAPTCHA Verification is selected on the Web-to-Case page
in Setup, complete the reCAPTCHA fields. If you select that option after having already
generated the HTML code, generate the code again to ensure that it includes the reCAPTCHA
validation code.
- Leave Include reCAPTCHA in HTML selected.
- Enter the key pair that you obtained from Google and registered on the Salesforce Platform. Use the lookup to select a key pair that is already registered on the Salesforce Platform.
- Leave Enable Server Fallback selected to prevent the loss of case traffic. If the Google reCAPTCHA server fails or goes offline and spam filtering isn’t available, this setting allows all case traffic through.
- If your organization uses the Translation Workbench or has renamed tabs, select the language for the form labels displayed on your Web-to-Case form. The source of your Web-to-Case form is always in your personal language.
- Click Generate.
- Copy the generated HTML code and embed it into any page on your website. You can add it to multiple pages on your site.
- Click Finished.
To test the Web-to-Case form, add the line <input type="hidden" name="debug" value="1"> to the code. This line redirects you
to a debugging page when you submit the form. Don’t forget to remove it before publishing the
Web-to-Case page on your website.
Did this article solve your issue?
Let us know so we can improve!

