How do I use hidden parameters in Web to Case and Web to Lead?
|Knowledge Article Number||000005680|
|Description||How do I use hidden parameters in Web to Case and Web to Lead?|
|Resolution||When using the Salesforce Web to Lead and Web to Case, you can use hidden HTML parameters to set the values of your lead or case fields. The use of hidden parameters prevents your end-users from changing the value of those fields.
To pass a hidden value, use the following HTML tags:
<input type=hidden name="nameofhiddenfield" id="nameofhiddenfield" value="XXXX">
For example, if you want all cases captured via the Online Case Capture interface to have a Priority of High, then you would use the following HTML syntax:
<input type=hidden name="priority" id="priority" value="High">
Note: When writing the name/id of the field, use only lowercase, even though the API name shows capitalised in Salesforce
Custom fields can also be passed as hidden fields. However, this may require assistance from the Administrator of the Organization to attain the ID number of the custom field. The correct syntax to pass a hidden custom field would then be:
<input type="hidden" name="00N00000000X0xY" id="00N00000000X0xY" value="CustField">