Redirection to Thank you page after Contact Form submission - HotThemes

Search Form and Social Buttons

HotThemes Logo and Top Menu

After successful submission of the Contact form, by default, Joomla 1.5 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 answer 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 separate "Thank you" page, after the contact form is submitted. On that page, they usually put informational text, like when clients may expect answer 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?

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);
 

Links, Partners and Social Media