Forums

Problem with "On Submit Code"

kaj41354 26 Apr, 2009
This code is the only thing causing me grief and it is probably easy and I am missing a real simple solution but, I haven't found enough caffeine to get my brain activated.

My code in the On Submit Code: after sending email section
=================================================================
div>
<p> </p>
<h2>Thank You and Congratulations!</h2>
<p> </p>
<p><strong>The BAP chairman will be reviewing your submission and will reply to you soon . . .</strong></p>
<p><strong>You will now be returned to the BAP Spawning Report form.... </strong></p>
</div>
<p>setMetaData( 'refresh', '10; url=index.php?option=com_chronocontact&chronoformname=aclcbapspawningrpt2', 'Refresh' ); ?></p>
===============================================================
What happens is the form goes to a page that looks like this:
================================================================
Thank You and Congratulations!



The BAP chairman will be reviewing your submission and will reply to you soon . . .


You will now be returned to the BAP Spawning Report form....

setMetaData( 'refresh', '10; url=index.php?option=com_chronocontact&chronoformname=aclcbapspawningrpt2', 'Refresh' ); ?>

=====================================================================
and that last line is displayed and the user is not redirected. I know the problem is in that last line but what am I missing.

Thanks
GreyHead 26 Apr, 2009
Hi kaj41354,

setMetaData is a Joomla PHP Instruction - you can't just drop it in the middle of your html. Any PHP code must be inside <?php . . . ?> tags.

I've not seen setMetaData used this way before so have no idea if it will work as you want.

Bob
kaj41354 26 Apr, 2009
Would you recommend something better? I am not sure where I got this code from but I am open to suggestions
GreyHead 26 Apr, 2009
Hi kaj41354,

See this post as evidence that my memory is not as good as it used to be :-)

Bob
kaj41354 26 Apr, 2009
Thanks Bob,

I knew I saw it somewhere! lol - Thanks for your help
This topic is locked and no more replies can be posted.