1. Fields
  2. Contact Selector Field

Fields

Contact Selector Field

The Contact Selector Field allows for creating a new contact or selecting an existing one from the contact list.

See contacts for more information on contacts.

Basic usage

Adds a contactselector field to the fields of an action.

loading...

Result

Preview of a contactselector field in a form

Parameters

See fields for common parameters.

Result Data

The data that will be added into stub.data will be as follows:

editor
        {
  "contact_person": {
    "contactuuid": "8961b613-bba0-58f5-aeeb-4c25dcf88888",
    "descname": "Peter Genkins",
    "type": "individual",
    "firstname": "Peter",
    "lastname": "Genkins",
    "middlenames": "",
    "is_personal": false,
    "contactpoints": [
      {
        "contact": "email@example.com",
        "type": "email",
        "label": "email",
        "uuid": "840517c3-9605-567a-b041-c16459188888"
      },
      {
        "contact": "+12124567890",
        "type": "mobile",
        "label": "mobile",
        "uuid": "6c3f6dd8-9b01-5c34-b434-4b1d5d288888"
      }
    ],
    "details": {
      "company": "",
      "position": ""
    }
  },
  "contact_person_label": "Peter Genkins",
}

      

All the data key:value pairs are mostly self explanatory, so I will touch a few key data points.

contact_person

object

The JSON object containing all the data related to the selected contact. The objects key name will take on the field name.


contact_person_label

string

The string that appeared in the Contact Selection field for the selected contact. This is usually the same as descname


contact_person.contactuuid

string

This is the unique UUID assigned to this contact.

You can use this UUID:

  • add this contact to a contact list
  • send messages to in a notification

contact_person.contactpoints

array

Is an array of objects. Each object contains the data of a contact point for the contact.

A contact can have multiple contact points, so there could be quite a few object here.