How do I make my form redirect to a thank you page at a different URL instead of using the thank you page that the form creates?
Create an END SUBMIT piece.
Form Properties > Advanced Tab > More Options > Submit Pieces Tab Then click on "CUSTOM" in the END SUBMIT section and paste in the following code:
$this->execPieceByName('ff_InitLib'); JFactory::getApplication()->redirect('myThankYouPage.php'); /*If you are redirecting to a page outside of your server, then it should be coded like this:*/ $this->execPieceByName('ff_InitLib'); JFactory::getApplication()->redirect('http://www.yourDomain.com/page.html'); /**If your form is displayed in an iFrame and you want the page you are redirecting to, to break out of the iFrame and appear in the main window, use this code instead: */ $this->execPieceByName('ff_InitLib'); JFactory::getApplication()->redirect('/myThankYouPage.php', 'parent');
or, if redirecting to a page outside of your server:
$this->execPieceByName('ff_InitLib'); JFactory::getApplication()->redirect('http://www.yourDomain.com/page.html', 'parent');
(Remember to replace the /myThankYouPage.php or http://www.yourDomain.com/page.html with the correct URL for your thank you page!)
Once you have added that code, click on the SAVE button at the bottom of that screen. You will then be taken back to the form's property screen. Click on SAVE PROPERTIES to save the changes to the form's properties, and then click on the SAVE icon in the upper left-hand corner of the screen to save the form itself.