Loading

Pass hidden parameters in Web to Case and Web to Lead

Publiceringsdatum: May 21, 2026
Beskrivning

Use hidden parameters in Web to Case and Web to Lead to pass additional data and prevent the end user from changing those values.
Lösning

How to Pass Hidden Parameters

When using Salesforce Web to Lead and Web to Case, hidden HTML parameters can be used to set the values of lead or case fields. Hidden parameters prevent end users from changing those field values.

To pass a hidden value, add the following hidden input element to your HTML form:

 
<input type=hidden name="nameofhiddenfield" id="nameofhiddenfield" value="XXXX">
 

Example: Set Case Priority to High

To set the Priority field to High for all cases captured via Web to Case, add the following hidden input element to your HTML form.

The name and id attributes use lowercase field API names, and value contains the desired field value.

 
<input type=hidden name="priority" id="priority" value="High">
 

Note: When writing the name or id of the field, use only lowercase characters, even if the API name appears capitalized in Salesforce.

Passing Custom Field Values as Hidden Parameters

Custom fields can also be passed as hidden parameters. This may require assistance from a Salesforce Administrator to obtain the custom field ID.

To pass a custom field value, add a hidden input element using the custom field ID as the name and id.

 
<input type="hidden" name="00N00000000X0xY" id="00N00000000X0xY" value="CustField">

Knowledge-artikelnummer

000385544

 
Laddar
Salesforce Help | Article