How to REDIRECT after Submit Contact form!

Many questions have been asked on how to redirect to a Thank-You page after submitting a contact-us form from the contact component. The current implementation of the Thank you message above the submitted form is a jerk and not very profesional. Here is how to solve this.

  • Make a Thank-You page in Static Content. Choose whatever content or title you want to use.
  • Create a menu-item (Static-Content) and point it to your Thank-You page or whatever title you have given it. The reason for this is that we want to findout the exact URL of the link to your static content "thank-you" page
  • Imagine that your link has got the id's something like This means we now know what the URL is so we can modify some little piece of code…It is only very little!
  • Open with a good editor such as Dreamweaver or equivalent the contact.php file, located in components/com_contact

now find on or around line 462 – 464 (in my version) this code:

$link = 'index.php?option=com_contact&task=view&contact_id='. $contact[0]->id .'&Itemid='. $Itemid;

      mosRedirect( $link, _THANK_MESSAGE )

replace that code with the URL for the contact Thank-you page as defined as follows:

mosRedirect( '' )

If you have SEF enabled and have some nice URL's defined or have something like (example) than put that SEF-based URL into the code…

Solution by

Leave a comment

All fields marked (*) are required