PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar sshekhar563
sshekhar563
20 Nov 2025

Summary

This pull request adds a conditional check before rendering the email form heading in
components/com_contact/tmpl/contact/default.php.

Problem

The email form heading (COM_CONTACT_EMAIL_FORM) is currently rendered unconditionally.
This causes the heading to appear even when the email form itself is hidden or disabled.

Examples:

  • When show_email_form is disabled.
  • When contact has no email assigned.
  • When templates or accessibility rules require hiding the heading.

This leads to unnecessary UI output and inconsistent layout behavior.

What This PR Changes

The email form heading is now displayed only when:

  1. The email form is enabled (show_email_form).
  2. The contact has either an email or assigned user.
  3. A new optional parameter show_email_heading (default: 1) is enabled.

Implementation

Wrapped the heading inside a new conditional block:

<?php if ($tparams->get('show_email_heading', 1)) : ?>
    <<?= $htag2 ?>><?= Text::_('COM_CONTACT_EMAIL_FORM') ?></<?= $htag2 ?>>
<?php endif; ?>
avatar sshekhar563 sshekhar563 - open - 20 Nov 2025
avatar sshekhar563 sshekhar563 - change - 20 Nov 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Nov 2025
Category Repository Front End com_contact Libraries
avatar sshekhar563 sshekhar563 - change - 20 Nov 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-11-20 06:28:35
Closed_By sshekhar563
Labels Added: PR-5.4-dev
avatar sshekhar563 sshekhar563 - close - 20 Nov 2025

Add a Comment

Login with GitHub to post a comment