mbr_member_dir
Usage
This shortcode returns an editable ajax table consisting of a segment of your ActiveCampaign contacts, selected by ActiveCampaign tag ID/tag name, or by being subscribed in an ActiveCampaign list.
Using this shortcode, both regular and custom fields can be edited. The changes are immediately posted both locally, to your WordPress site, and to your ActiveCampaign application. In addition, automations can be initiated for individual contacts listed in the table.
Parameters
Parameters | Description |
---|---|
tag | A single tag ID or tag name defined within ActiveCampaign to segment the table i.e. only contacts with this tag will appear in the table. The available tags can be found in ActiveMember360, Utilities, Tags. Defaults: none. Required: yes, if list_id not specified. |
list_id | A single list ID defined within ActiveCampaign to segment the table i.e. only contacts subscibed to this list will appear in the table The available lists can be found in ActiveMember360, Utilities, Lists. If more than one is entered, please separate with commas. Defaults: none. Required: yes, if tag not specified. |
fields | The ActiveCampaign contact fields to display in the table. The field can be any contact field in ActiveCampaign, e.g. first_name, last_name, phone, my_custom_field etc. The available field names can be found in ActiveMember360, Utilities, Contact Fields. The lower case version of the Perstag should be used as the field name. Defaults: none. Required: yes. |
only_contact_id | A comma separated string of ActiveCampaign contact ID’s that determines whether the is allowed to see the table. When used only a remote user with a contact ID matching one of those specified will be able to see the table. If the only_contact_id parameter is not specified any visitor can see the table.Default: none. Required: no. |
editable | Specifies whether edits can be made directly from within the table. Permitted Values: yes, no Default: no Required: no. |
edit_fields | The ActiveCampaign contact fields that can be edited within the table. The field can be any contact field in ActiveCampaign, e.g. first_name, last_name, phone, my_custom_field etc. The available field names can be found in ActiveMember360, Utilities, Contact Fields. The lower case version of the Perstag should be used as the field name. Only applicable if the editable paramter is set to yes.Default: yes Required: no. |
edit_labels | The header titles if field names are not used. They correspond in order and number to the fields specified in the fields parameter.Default: The Required: no. |
only_self_edit | If set to yes non-existent tags in your ActiveCampaign application specified for the assign_tags parameter will be automatically created. If the tag does not exist the value for assign_tags will be used as the tag name. Default: yes Required: no. |
headers | Specifies whether header titles should be used for the table. Titles will be the title case version of the filed names specified in the field parameter, unless the header_labels parameterDefault: yes Required: no. |
header_labels | The header titles if field names are not used. They correspond in order and number to the fields specified in the fields parameter.Default: none. Required: no. |
avatar_header | The header title for the avatar column in the table. Default: none. Required: no. |
avatar_field | The ActiveCampaign contact field where the alternate avatar URL is stored if not using gravatar.com. Defaults: none. Required: no. |
avatar_size | The size of the avatar in pixels. Limited to 1 minimum and 128 maximum. Defaults: As set in ActiveMember360, Settings, Miscellaneous, Default avatar size Required: no. |
avatar_default | The avatar to be shown if a contact in the list does not have a registered gravatar at gravatar.com Defaults: mm (Mystery Man). Required: no. |
avatar_alt | The alt text to be used for the image link. Defaults: none. Required: no. |
automations | One or more automation ID's defined within ActiveCampaign to add the contact to. The available automations can be found in ActiveMember360, Utilities, Automations. If more than one is entered, please separate with commas. Defaults: none. Required: |
page_length | The maximum number of rows to be shown within the table on a single page Default: 10 Required: no. |
The use of tag ID's over tag names is encouraged. Unless a tag is deleted, its tag ID can be considered persistent and unique. Tag names, on the other hand, can be changed at any time and do not need to be unique. Using a tag name that is not unique or has been changed can cause your shortcode, hook or module to no longer work as expected.
Validity
This shortcode is only processed 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 processed.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_member_dir].
Nesting
Shortcode nesting is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
Update the currently logged in users ActiveCampaign contact field first_name
to John:
[mbr_member_dir field='first_name' value='John']
Update the currently logged in users ActiveCampaign contact field; email
to john@example.com and my_custom_field
to 12345. Please note the email update will also update the email address for the logged in WordPress user:
[mbr_member_dir email='john@example.com' my_custom_field='12345']
Update the currently logged in user's ActiveCampaign contact field my_custom_field
to 12345. Also assign tag IDs 123, 456 and tag name My Tag Name to the contact. Do not autocreate any tags specified in the assign_tags
parameter if they do not exist in the ActiveCampaign application i.e are not found in ActiveMember360, Utilities, Tags:
[mbr_member_dir my_custom_field='12345' assign_tags='123,My Tag Name,456' autocreate_tags='no']
Update the currently logged in user's ActiveCampaign contact field my_custom_field_2
to 12345. Also assign ActiveCampaign tag IDs 123, 456 and tag name My Tag Name to the contact and remove tags IDs 987, 876 and tag name Another Tag Name. Autocreate any tags specified in the assign_tags
parameter if they do not exist in the ActiveCampaign application i.e are not found in ActiveMember360, Utilities, Tags. In addition add the contact to the ActiveCampaign automation with id 65:
[mbr_member_dir my_custom_field_2='98765' assign_tags='123,My Tag Name,456' remove_tags='987,Another Tag Name,876' assign_automation='65']
API
There is currently no ActiveMember360 API function equivalent for this shortcode.