Using Variables

Requires Pro Plus or higher

Variables make it possible to incorporate dynamic content into a site's text, link URLs, form values and more. A variable is generally made up of a name and an optional fallback value:

{{name|fallback}}

The name portion of the variable is the unique name associated with the content (or value) you're trying to include, while the fallback portion is an optional fallback in case the value is blank or the variable doesn't exist. For example, the variable {{url.name}} in the following line of text:

Welcome, {{url.first_name}}!

... will be replaced with the value of url.first_name, which in this case is the first_name URL parameter:

Welcome, Cayce!

Similarly the variable {{url.first_name|friend}} will also be replaced with the contents of the first_name URL parameter, but if it's blank or doesn't exist it'll instead be replaced with the fallback value friend:

Welcome, friend!

Supported Variables

Below is a list of all variables currently supported by Carrd. Most can be used anywhere variables are supported (see the Supported Elements table below), while others are limited to usage within specific element types.

AvailabilityVariableDescription
Anywhere{{url.parameter_name}}

Contents of the parameter_name URL parameter. Common uses include appending UTM parameters (such as utm_source and utm_medium) to outgoing links, and dynamically populating form fields with default values.

Anywhere{{client.date}}

Client's local date in numeric format (eg. 1/3/22).

Anywhere{{client.time}}

Client's local time in HH:MM format (eg. 12:34 PM)

Anywhere{{client.fulldate}}

Client's local date in string format (eg. January 3, 2022).

Anywhere{{client.fulltime}}

Client's local time in HH:MM:SS format (eg. 12:34:56 PM).

Anywhere{{client.timestamp}}

Alias of client.utc_timestamp.

Anywhere{{client.utc_date}}

UTC date in numeric format (eg. 1/3/22).

Anywhere{{client.utc_time}}

UTC time in HH:MM format (eg. 12:34 PM)

Anywhere{{client.utc_fulldate}}

UTC date in string format (eg. January 3, 2022).

Anywhere{{client.utc_fulltime}}

UTC time in HH:MM:SS format (eg. 12:34:56 PM).

Anywhere{{client.utc_timestamp}}

UTC time as a Unix timestamp (eg. 1641213240).

Form: Contact{{name}}

Current value of the Name field.

Form: Contact{{email}}

Current value of the Email field.

Form: Contact{{message}}

Current value of the Message field.

Form: Contact{{company}}

Current value of the Company Name field.

Form: Contact{{phone}}

Current value of the Phone Number field.

Form: Contact{{subject}}

Current value of the Subject field.

Form: Contact{{consent}}

Current value of the Require Consent field.

Form: Signup{{email}}

Current value of the Email field.

Form: Signup{{fname}}

Current value of the First Name field (or Name field if using a single name field).

Form: Signup{{lname}}

Current value of the Last Name field.

Form: Signup{{company}}

Current value of the Company Name field.

Form: Signup{{phone}}

Current value of the Phone Number field.

Form: Signup{{consent}}

Current value of the Require Consent field.

Form: Custom{{field_id}}

Current value of the field_id field.


Supported Elements

Variables are currently supported by the following elements:

ElementWhere
Buttons
  • Labels
  • Link URLs
Form
  • Button labels
  • "On Complete" messages and URLs
  • "On Success" messages and URLs
  • "On Failure" messages and URLs
  • "On Submit" event code
  • "On Success" event code
  • "On Failure" event code
  • (Custom) Input values
  • (Custom) Input labels
  • (Custom: Run Code) Code
Gallery
  • Link URLs
Icons
  • Link URLs
Image
  • Link URLs
Links
  • Labels
  • Link URLs
List
  • Items
Table
  • Headings
  • Rows
Text
  • Content