Still searching - here is the reference published in 2010 (old Joomla)
"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);
" End of article referred to.
With Joomla 3.8 you don't hack this, it's the redirect line in the contact form.
But....somewhere in the background it's stuck so I'm wondering if you may have any knowledge of Joomla 3.8 where that line is? Joomla php file? - I've looked at my live site Joomla "contact.php" file and it looks like this:
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Controller for single contact view
*
* @since 1.5.19
*/
class ContactControllerContact extends JControllerForm
{
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6.4
*/
public function getModel($name = '', $prefix = '', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, array('ignore_request' => false));
}
/**
* Method to submit the contact form and send an email.
*
* @return boolean True on success sending the email. False on failure.
*
* @since 1.5.19
*/
public function submit()
{
// Check for request forgeries.
$this->checkToken();
$app = JFactory::getApplication();
$model = $this->getModel('contact');
$params = JComponentHelper::getParams('com_contact');
$stub = $this->input->getString('id');
$id = (int) $stub;
// Get the data from POST
$data = $this->input->post->get('jform', array(), 'array');
$contact = $model->getItem($id);
$params->merge($contact->params);
// Check for a valid session cookie
if ($params->get('validate_session', 0))
{
if (JFactory::getSession()->getState() !== 'active')
{
JError::raiseWarning(403, JText::_('JLIB_ENVIRONMENT_SESSION_INVALID'));
// Save the data in the session.
$app->setUserState('com_contact.contact.data', $data);
// Redirect back to the contact form.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&id=' . $stub, false));
return false;
}
}
// Contact plugins
JPluginHelper::importPlugin('contact');
$dispatcher = JEventDispatcher::getInstance();
// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
JError::raiseError(500, $model->getError());
return false;
}
if (!$model->validate($form, $data))
{
$errors = $model->getErrors();
foreach ($errors as $error)
{
$errorMessage = $error;
if ($error instanceof Exception)
{
$errorMessage = $error->getMessage();
}
$app->enqueueMessage($errorMessage, 'error');
}
$app->setUserState('com_contact.contact.data', $data);
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&id=' . $stub, false));
return false;
}
// Validation succeeded, continue with custom handlers
$results = $dispatcher->trigger('onValidateContact', array(&$contact, &$data));
foreach ($results as $result)
{
if ($result instanceof Exception)
{
return false;
}
}
// Passed Validation: Process the contact plugins to integrate with other applications
$dispatcher->trigger('onSubmitContact', array(&$contact, &$data));
// Send the email
$sent = false;
if (!$params->get('custom_reply'))
{
$sent = $this->_sendEmail($data, $contact, $params->get('show_email_copy', 0));
}
// Set the success message if it was a success
if (!($sent instanceof Exception))
{
$msg = JText::_('COM_CONTACT_EMAIL_THANKS');
}
else
{
$msg = '';
}
// Flush the data from the session
$app->setUserState('com_contact.contact.data', null);
// Redirect if it is set in the parameters, otherwise redirect back to where we came from
if ($contact->params->get('redirect'))
{
$this->setRedirect($contact->params->get('redirect'), $msg);
}
else
{
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&id=' . $stub, false), $msg);
}
return true;
}
I don't see it anywhere referring to this line:
(new redirect) https://www.(sitenamewithheld)/index.php?option=com_content&view=article&id=11&Itemid=112
or
(old redirect) https://www.(sitenamewithheld)/index.php?option=com_content&view=article&id=2
Does this help?