Setting the Default Value of Input Fields
You can set the default value of an input field that you add to a form or page. This automatically populates the input field with the value you specify when the page loads.
Required Editions
| Available in: Salesforce Classic |
Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition |
| User Permissions Needed | |
|---|---|
| To build, edit, and manage Site.com sites: | Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level |
When used with a field's Hidden Field property, which hides the field on the form or page, the default value is a useful tool for submitting data that you don't want your users to see. For example, you could add a hidden field that uses the Global Property option to track when a form is submitted.
To set the default value of a field:
- Select the field.
- Click Configure in the Properties pane.
-
Select the source of the default value.
Option Description Fixed Value Use when you want to specify the value. For example, for a text field, you could add default text. Alternatively, if the field is a picklist, you can select a default value from the list. URL Query String Use when you want to pass variable content via a URL to the item when the page loads. For example, if you're working with a picklist field, you could pass variable information, such as location, to filter the list and display only items from that location. See Data Filtering Examples for similar scenarios using data repeaters. Global Property Use when you want to use a fixed value from the site, such as the current date or current time. Request Header Use when you want to use a value from the browser, such as the host header or browser version. - Set the default value.
- Click Save.

