mbr_contact
Usage
This shortcode returns the contents of the specified ActiveCampaign contact field for the current logged in or specified contact.
Parameters
Parameters | Description |
---|---|
field | Specifies the name of an ActiveCampaign contact record field to display. The field can be any contact field in ActiveCampaign and any field type. The available field names can be found in ActiveMember360, Utilities, Contact Fields. The upper or lower case version of the Perstag should be used as the field name. Standard fields can be: id, email, first_name, last_name, phone. Default: none. Required: yes. |
contact_id | The ActiveCampaign contact ID of the contact for whom the ActiveCampaign contact field should be displayed. Default: Current logged in user contact ID. Required: no. |
type | Specifies the data type for the contact field selected by the field parameter, e.g. date, number or currency string choose from date, number or currency. Permitted values: string, number, currency, date Default: none. Required: no. |
format | The desired format for the field. Only applies if type is set to date. The format must follow the syntax rules set for PHP as detailed within date formats. Default: none. Required: no. |
decimals | How many decimals do you want to display. Only applies if type is set to number. Default: 0 Required: no. |
dec_point | Decimal sign. Only applies if type is set to number. Default: . (DOT). Required: no. |
thousands_sep | Thousands separator. Only applies if type is set to number. Default: , (COMMA). Required: no. |
locale | Set your locale e.g. en_US, en_UK, de_DE to set the monetary locale to display fields of type currency. Default: Your WordPress locale based on your blog settings e.g. en_US. Required: no. |
callback | Callback function to be called to process the value of the field provided in the ‘field’ parameter. Default: none. Required: no. |
default | The default value to display if the ordered field has no value in the ActiveCampaign contact record of the logged in contact. Default: none. Required: no. |
Validity
This shortcode is only evaluated for logged in users who also exist as contacts within ActiveCampaign.
In all other cases, including WordPress users with the Administrator role nothing will be returned.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_contact].
Nesting
Shortcode nesting is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
- Example 7
Display the contact field email
for the logged in user:
[mbr_contact field='email']
Display the contact field my_contact_field
for the logged in user:
[mbr_contact field='my_contact_field']
Display the contact field contact_id
for the logged in user:
[mbr_contact field='contact_id']
Display the contact field first_name
for the logged in user:
[mbr_contact field='first_name']
Display the contact field last_name
for the logged in user:
[mbr_contact field='last_name']
Display the date contact field birthday
formatted as Y-m-d for the logged in user:
[mbr_contact field='birthday' type='date' format='Y-m-d']
Display the contact field email
for the contact whose contact id is stored in the contact field affiliate_id
of the current logged in user:
[mbr_contact field='email' contact_id='[mbr_db_affiliate_id]']
Alternatively, this shortcode can be used in a shorter form. However when using the short form the field values will be returned in the format exactly as stored within ActiveCampaign:
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
- Example 7
Display the contact field email
for the logged in user:
[mbr_db_email]
Display the contact field my_contact_field
for the logged in user:
[mbr_db_my_contact_field]
Display the contact field contact_id
for the logged in user:
[mbr_db_contact_id]
Display the contact field first_name
for the logged in user:
[mbr_db_first_name]
Display the contact field last_name
for the logged in user:
[mbr_db_last_name]
There is no short form of this shortcode when using any parameters other than the contact field.
There is no short form of this shortcode when using any parameters other than the contact field.
API
There is currently no ActiveMember360 API function equivalent for this shortcode.