Skip to main content

mbr_contact

Usage

This shortcode returns the contents of the specified ActiveCampaign contact field for the current logged in or specified contact.

Parameters

ParametersDescription
fieldSpecifies 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_idThe ActiveCampaign contact ID of the contact for whom the ActiveCampaign contact field should be displayed.
Default: Current logged in user contact ID.
Required: no.
typeSpecifies 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.
formatThe 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.
decimalsHow many decimals do you want to display. Only applies if type is set to number.
Default: 0
Required: no.
dec_pointDecimal sign. Only applies if type is set to number.
Default: . (DOT).
Required: no.
thousands_sepThousands separator. Only applies if type is set to number.
Default: , (COMMA).
Required: no.
localeSet 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.
callbackCallback function to be called to process the value of the field provided in the ‘field’ parameter.
Default: none.
Required: no.
defaultThe 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

Display the contact field email for the logged in user:

[mbr_contact field='email']

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:

Display the contact field email for the logged in user:

[mbr_db_email]

API

Note

There is currently no ActiveMember360 API function equivalent for this shortcode.