Problem/Motivation

Contact entities have default start- and end dates.
In a scenario where it is not relevant to collect this information, the "Age" tab still shows up on the contact form.

Steps to reproduce

* Edit the "Person" contact type (/admin/structure/crm/contact-types/manage/person/form-display)
* Move the Start Date / End Date fields into the "Disabled" region
* Load the form for adding a new person contact (/crm/contact/add/person)
* An empty "Age" tab shows up at the bottom.

Proposed resolution

Only show the tab if it contains actual fields

Issue fork crm-3567927

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svendecabooter created an issue. See original summary.

svendecabooter’s picture

Status: Active » Needs review
anjuelsaphilip2020’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new22.63 KB
new33.34 KB

Hi, I've verified and tested MR!171 and applied the patch successfully on CRM 1.0.x-dev version. The changes are working as expected.
Following steps I followed:

  1. Go to Structure → CRM → Contact Types → Person → Manage Fields.
  2. Add the fields Start Date and End Date (if not already present).
  3. Go to Form Display for the Person contact type
  4. Go to the Add Person contact form
  5. Observe the tabs at the bottom of the form.

Testing Result:After applying the patch, the Age tab no longer appears when Start Date and End Date fields are hidden.Only tabs containing visible fields are displayed on the form.
Attaching screenshots for reference.
Thanks

bluegeek9 made their first commit to this issue’s fork.

bluegeek9’s picture

Status: Reviewed & tested by the community » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.