Rapid Contact Ex is one of the easiest most robust and customizable contact form extensions for Joomla! Ever wondered how to customize the emails received by Rapid Contact Ex? Here's how!

Using template overrides

The most straightforward way of customizing Rapid Contact Ex emails is using template overrides. Those are files that override the current extension functionality without changing its core, thus normally allowing extension updates, while maintaining our valuable customizations! If you're wondering how to do that, you can read our article on creating template overrides in Joomla.

  Make sure to create template overrides for com_rapidcontactex, not mod_rapid_contact_ex!

 After creating these overrides for com_rapidcontactex (currently at version 2.4.827 while writing this article), you'll find the following files we want:

  • default_email_checkbox_group_header.php
  • default_email_checkbox_group_footer.php
  • default_email_copy_header.php
  • default_email_copy_html_wrapper.php
  • default_email_field_group_header.php
  • default_email_field_group_footer.php
  • default_email_field_value_pair.php
  • default_email_header.php
  • default_email_html_wrapper.php

Let's explain these files by common overrides that we can perform.


How to change the field colors

Rapid Contact Ex includes a few colors in emails by default. You can change these colors in the file default_email_field_value_pair.php.

This file includes a color array variable, called $bg_options. This variable is instantiated at line 15. You can add new colors (or change the existing ones) by editing this line:

$bg_options = array('#73d3d4', '#88c9d6', '#81cfcf', '#85d5df', '#8dded7', '#7ddad3'); // You can add your own colors here.

Just add the desired hex color values, inside single quotes, separated by a comma. Whitespace is ignored.


How to change the text "You received a message from ..." and "This is a copy of the message from ..."

The email sent from Rapid Contact Ex to the administrator includes a short line with the sender name at the beginning. By default this line says "You received a message from Example Name". You can easily change that by creating a Language override of the YOU_RECEIVED_A_MESSAGE_FROM language key. For more information on how to do that, you can read this article on language overrides.

The email copy to the user includes the short line "This is a copy of the message from Example Name". This can change using the language key THIS_IS_A_COPY_OF_THE_MESSAGE_FROM.

If you want to completely customize the header sent to the administrator, you can override the file default_email_header.php. Inside that file, you could add any HTML you would like to have, including logos and images.

To customize the email copy sent to the user, you can use the file default_email_copy_header.php. As in the file default_email_header.php, you are welcome to include any HTML, targeting your form's end-users.


How to add custom logos, images or other HTML around the form fields?

You can use the file default_email_html_wrapper.php for emails to the administrator and default_email_copy_html_wrapper.php for emails to your form's end users. You can completely change the structure of this email, and use the following smart texts, wherever you want to include them:

%RPX_SUBJECT% The email subject. This is either set in Rapid Contact Ex component options, or written from the user if you use the #Message Subject# intelligent field name.
%RPX_HEADER% The email header, as written in the default_email_header.php or default_email_copy_header.php respectively.
%RPX_MESSAGE% The field-value pairs of the submitted form.


How to customize Checkbox Groups and Field Groups in emails?

You can use the files default_email_field_group_header.php and default_email_field_group_footer.php for field groups, and default_email_checkbox_group_header.php and default_email_checkbox_group_footer.php for checkbox groups.

  Warning! HTML elements opening in the header files are closed in the footer files. You need to open and close the same amount of elements, and in the correct order!

Field Group Creators and Checkbox Groups are fields that multiply and re-use existing form fields. For example, passenger information for a flight includes the same details for every passenger. This is where Field Group Creators are used. Checkbox Groups are similar, but with Checkboxes for the user to select their desired value groups.


Can't find what you're looking for?

Rapid Contact Ex comes with built-in help messages. Whether you're editing fields or creating a module instance, you can find helpful tips within the extension itself. You can also find a wide range of information about Rapid Contact Ex in the following resources:


Support Forum

Help Base