Big picture: I want to display some custom data on a thank you page for a specific contribution page. In my module I'm using hook_civicrm_preProcess. Like so:
function custom_thankyou_civicrm_preProcess($formName, &$form) {
if ($formName == "CRM_Contribute_Form_ContributionPage_ThankYou" && ($form->getVar('_id') == 5)) {
// do stuff, like send my custom data to a smarty template.
} }
But here's the problem, my customized message doesn't show up on the thank you page for that contribution. It does however show up on the configuration screen for "Thank-you and Receipting" in the civi interface.
I guess it's not too surprising since the url for the config page is:
mycivicrmhost/index.php?q=civicrm/admin/contribute/thankyou&reset=1&action=update&id=5
and the url for the thank you page ends up being one like this:
mycivicrmhost/index.php?q=civicrm/contribute/transact&_qf_ThankYou_display=1&qfKey=3ee9c31da51b3af9dbe8c8efa5765520_1396
Is it possible to do this or should I set up an "external" thank you page instead?
Thank you