Custom fields

Member profiles can contain custom data, located in the member object at contactDetails.customFields. The member object is returned when calling these functions:

The Members API works with custom fields that are added to the member profile in the Dashboard. Custom fields that haven't been added to the member profile aren't available through the Members API. When retrieving members, empty fields are not returned. You can query, create, rename, and delete custom field definitions with the Contacts Extended Fields API.

Data structure

The member's customFields object contains key:object pairs. The key is defined in the Contacts Extended Fields API. The paired object is structured as follows:

Copy

The paired object contains these properties:

  • name: Display name. Read only.
  • value: Value stored for the member.

Retrieve custom field IDs

For a list of your site's custom field IDs, use this function in your backend code:

Copy

Set a custom field for a new site member

You can set the value of a custom field for a new site member in the contactInfo object using the authentication.register() function. Use a key:value pair in the top level level of the contactInfo object, like this:

Copy
Did this help?