Summary
Displays the value submitted for the field with the specified field_id. If no value was submitted, the merge tag will not display anything. Adding optional modifiers are also available to display other data related to the field.
Usage
Merge Tag | Example |
---|---|
{[descriptor] :[field_id] } | {Something:1} |
{[descriptor] :[field_id] :[modifier] } | {Something:1:value} |
{:[field_id] } | {:1} |
{:[field_id] :[modifier] } | {:1:value} |
Parameters
Parameter | Description |
---|---|
[descriptor] | Optional. A user defined value for readability. By default when using the merge tags widget, this will be the field name. Since this is optional, {:[field_id]} will work also. |
[field_id] | Required. This is the value of the field_id, which may be a single number for the field, or a multi-part number for multi-part fields that have more than one field within them, such as the Name field. See Example below. |
[modifier] | Optional. A list of possible modifiers are listed below. Some modifiers may be combined by comma-separating them. See :admin modifier below for example. |
Example
{text:4} will select field ID 4. {name:5.3} will target the 3rd part of the field ID 5, such as the first name within a name field. If in doubt as to how to determine your field ID, use the merge tag dropdown widget to select the field by name and the proper ID will be inserted for you.
Modifiers
Modifier | Description |
---|---|
:label | Displays the field label. Can be used with the :admin label. {phone:1:label} or {phone:1:admin,label} |
:admin | Outputs the field admin label when combined with the label modifier. Since Gravity Forms 2.4.18.7. {phone:1:admin,label} or {phone:1:label,admin} |
:url | Applies only to fields of type List. Displays the list field content in a format that is URL friendly. i.e. col1_row1|col2_row1,col1_row2|col2_row2 {List:5:url} |
:value | Applies only to fields of type Drop Down, Checkbox and Radio Button. Displays the selected item’s value. Applicable if the field was configured with ‘enable values’. {Field:5:value} |
:id | Applies only to the fields of type Category. Displays the selected category’s id rather than label. {Category:5:id} |
:price | Applies only to Pricing fields of type Drop Down and Radio Button, and the Total field. Displays the selected product’s price in numeric format (i.e. 500). {Product:5:price} |
:currency | Applies only to Pricing fields of type Drop Down and Radio Button, and the Total field. Displays the selected product’s price in currency format (i.e. $500.00). {Product:5:currency} |
:qty | Applies only to drop down and radio button pricing fields. Displays the selected product’s quantity. |
:numeric | Converts the number string or currency value as a decimal-formatted number. {Field:5:numeric} |
Additional Information
Refer to individual field type user guides for field specific information on merge tags or modifiers.