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.
Availability | Variable | Description |
---|---|---|
Anywhere | {{url.parameter_name}} | Contents of the |
Anywhere | {{client.date}} | Client's local date in numeric format (eg. |
Anywhere | {{client.time}} | Client's local time in HH:MM format (eg. |
Anywhere | {{client.fulldate}} | Client's local date in string format (eg. |
Anywhere | {{client.fulltime}} | Client's local time in HH:MM:SS format (eg. |
Anywhere | {{client.timestamp}} | Alias of client.utc_timestamp. |
Anywhere | {{client.utc_date}} | UTC date in numeric format (eg. |
Anywhere | {{client.utc_time}} | UTC time in HH:MM format (eg. |
Anywhere | {{client.utc_fulldate}} | UTC date in string format (eg. |
Anywhere | {{client.utc_fulltime}} | UTC time in HH:MM:SS format (eg. |
Anywhere | {{client.utc_timestamp}} | UTC time as a Unix timestamp (eg. |
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 |
Supported Elements
Variables are currently supported by the following elements:
Element | Where |
---|---|
Buttons |
|
Form |
|
Gallery |
|
Icons |
|
Image |
|
Links |
|
List |
|
Table |
|
Text |
|