diff --git a/content/en/building/contact-management/contacts.md b/content/en/building/contact-management/contacts.md index a3b67ed5f..a8b622b64 100644 --- a/content/en/building/contact-management/contacts.md +++ b/content/en/building/contact-management/contacts.md @@ -72,6 +72,8 @@ Beneath that, you will find tasks for this person or place. At the very bottom i From profiles, users can edit contact information, take actions, and, if viewing a place profile, add new people and assign a primary contact person. If a place is not at the bottom of the hierarchy, a user can add new places to the level below this. +From 5.2.0, the profile header can display the contact's photo instead of the type icon. Set [`photo_field`](/building/reference/app-settings/hierarchy#app_settingsjson-contact_types) on the contact type to the contact field that stores the photo's filename; the type icon is used as a fallback. + ## Fields ### Contact Summary diff --git a/content/en/building/forms/contact.md b/content/en/building/forms/contact.md index 89c818828..c47d5ab1c 100644 --- a/content/en/building/forms/contact.md +++ b/content/en/building/forms/contact.md @@ -167,3 +167,7 @@ It is also possible to create additional contacts as children of the new place u | text | name | Member Name | | | | | end_repeat | child | | | | | | end_group | repeat | | | | | + +### Capturing photos and files on child contacts + +From 5.2.0, a binary upload field placed inside the `contact` group or the `child` repeat is attached to that person's doc rather than to the place. Attachment ownership is resolved by the section the field sits in. Combined with the contact type's [`photo_field`](/building/reference/app-settings/hierarchy#app_settingsjson-contact_types), this is how a child contact created in the form gets its profile photo. diff --git a/content/en/building/reference/app-settings/hierarchy.md b/content/en/building/reference/app-settings/hierarchy.md index b5f11ea9b..f2b1110a9 100644 --- a/content/en/building/reference/app-settings/hierarchy.md +++ b/content/en/building/reference/app-settings/hierarchy.md @@ -32,6 +32,7 @@ From 3.7.0 it is possible to configure what types of places and people are avail | `edit_form` | The string ID for the xform used to edit contacts of this type. | No, defaults to the create_form. | | `count_visits` | Whether or not to show a count of visits for contacts of this type. Requires UHC to be enabled. | No, defaults to `false`. | | `sort_by_dob` | Whether or not to sort contacts by date of birth in the contact detail page. By default, contacts are sorted alphabetically. | No, defaults to `false`. | +| `photo_field` | From 5.2.0. The name of the contact field holding the photo's filename. The contact's profile header displays the matching `user-file-` attachment as a circular photo, falling back to the type `icon` when no photo is present. The photo is captured by an upload field in the contact's create/edit form. | No, defaults to `photo`. | | `person` | Whether this is a person type or a place type. | No, defaults to `false`. | ### Forms