Skip to content

Document Custom Field Groups for Contacts and Companies#768

Open
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/custom-field-groups-7.2
Open

Document Custom Field Groups for Contacts and Companies#768
promptless-for-oss wants to merge 2 commits into
mautic:7.2from
Promptless:promptless/custom-field-groups-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Adds a Custom Field Groups section to the Manage Custom Fields page, covering creating groups, the auto-generated immutable alias, group ordering, assigning Fields via the Group dropdown, and the safe-delete rule. Documents the new feature from mautic/mautic PR #16265 (base 7.x → user docs 7.2).

Trigger Events


Tip: Worried about broken links? Ask Promptless to find and fix them automatically 🔗

*******************

Custom Field Groups let you organize Contact and Company Custom Fields into named tabs, alongside the built-in groups - Core, Social, Personal, and Professional for Contacts, and Core, Professional, and Other for Companies. Each group appears as a tab on the Contact and Company edit and detail views, so you can keep related Fields together.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented that Custom Field Groups are managed at Settings > Custom Field Groups and restricted to admins, based on PR #16265's new FieldGroupController route /contacts/field-groups, the mautic.lead.field_group.menu.index menu item with 'access' => 'admin', and the admin:full permission base in FieldGroupModel::getPermissionBase(). The built-in group lists (DEFAULT_LEAD_GROUPS, DEFAULT_COMPANY_GROUPS) come from the FieldGroup entity.

Source: mautic/mautic#16265


When you create a group, Mautic generates an **Alias** from the name - for example, 'Billing' becomes 'billing'. Your Fields reference the group by this alias, so it's read-only and never changes, even if you rename the group later.

Ordering groups

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the auto-generated, immutable Alias and the name validation (letters, numbers, and spaces only) from PR #16265: FieldGroup::setName() slugifies the name into the alias only when alias is null, the alias.help translation states it cannot be changed after creation, and loadValidatorMetadata() enforces the /^[a-zA-Z0-9\s]+$/ regex on the name.

Source: mautic/mautic#16265

Deleting a Custom Field Group
=============================

You can delete a group only when it has no Fields assigned to it. If you try to delete a group that still has Fields, Mautic blocks the deletion and shows this message: 'Cannot delete this field group because it still has fields assigned to it. Reassign or remove the fields first.' Reassign those Fields to another group or remove them, then delete the group.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented the safe-delete rule and exact flash message from PR #16265: FieldGroupController::deleteAction() blocks deletion when !$model->canDelete($entity) and adds the mautic.lead.field_group.error.has_fields flash, whose flashes.ini value is the quoted message. Group order behavior (custom groups after defaults, dropdown picks the group to appear before) is documented from FieldGroupModel::sortGroupedFields()/reorderGroupsByEntity(), the FieldGroupToOrderTransformer, and the order.help translation.

Source: mautic/mautic#16265

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions.

Comment thread docs/contacts/custom_fields.rst
Comment thread docs/contacts/custom_fields.rst
Comment thread docs/contacts/custom_fields.rst
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

@adiati98 thanks for the review — all three suggestions are applied and pushed to this PR:

  • Wrapped the Custom Field Groups section heading in .. vale off / .. vale on.
  • Applied your exact wording for the "assigning a Custom Field to a group" paragraph and added the Deleting a Custom Field Group sub-heading, wrapped in .. vale off / .. vale on.
  • Applied your exact wording for the safe-delete paragraph (including the blocked-deletion message), wrapped in .. vale off / .. vale on.

Vale confirms the targeted headings/paragraphs are no longer flagged. Ready for another look.

@adiati98 adiati98 added this to the Mautic 7.2 milestone Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants