Join our Affiliate Program to earn 30% from each sale! Earn now
Joomla Redirection to Thank you page

After successful submission of the Contact form, by default, Joomla displays an information message "Thank you for contacting us" or similar, depending of your language preferences. From my experience, many clients prefer separate "Thank you" page, after the contact form is submitted. On that page, they usually put informational text, like when clients may expect answers or Google Maps code with physical company location.

This message is usually displayed above the form, or wherever your template developer put "<jdoc:include type="message" />" code in template file. If you don't have this code in your template, you wouldn't see any message after form submission.

From my experience, many clients prefer a separate "Thank you" page, after the contact form is submitted. On that page, they usually put informational text, like when clients may expect answers or Google Maps code with physical company location.

How to redirect to a custom page made in Joomla, after successful submission of Joomla Contact form?

Joomla 3.x and later

Joomla Redirection to Thank you page

In newer Joomla versions, when you edit the contact, under the Form tab, you will find a parameter "Contact Redirect". Simply enter the address of your page where you want to redirect the visitor after the successful form submission.

Joomla 1.5

First of all, prepare a Joomla article that will be the "Thank you" page. We will redirect user to that page. Remember front-end link of that page.

Now, the hacking part. The file that you will be editing is /components/com_contact/controller.php. Lines 193-195 (in Joomla 1.5.15) should look like:

 
$msg = JText::_( 'Thank you for your e-mail');
$link = JRoute::_('index.php?option=com_contact&view=contact&id='.$contact->slug.'&catid='.$contact->catslug, false);
$this->setRedirect($link, $msg);
 

If you only want to change the text displayed when the contact form is submitted you edit the "Thank you for your e-mail" text below making sure to keep the single quote marks ' before and after.

If you want to make redirection to your "Thank you" page and disable information message, change this code to:

 
$link = JRoute::_('http://www.yoursite.com/thank-you-page-link');
$this->setRedirect($link);