The Thank you message again.
Hello,
I am using the CF V4 (latest)on my yOOtheme on Joomla! 2.5 everything seems to work okay except that the redirection on this code after email is not working.
<php
$doc = JFactory::getDocument();
$doc->setMetaData("refresh", "10;url=http://mysite.com", true, true);
?>
<h4>Hello <?php echo $form->data['hello'].' '.$form->data['fullname']; ?></h4>
<h4>Thank you for contacting the us.</h4><h4>Best wishes</h4><h4>My company.</h4>
Is there an issue in 2.5 ? Where could I be making an error ?
Please help
Thanks
Ron
Hi Ron,
I think that Joomla! removed setMetaTag. I used this code recently and it seems OK
<?php
$doc =& JFactory::getDocument();
$custom_tag = '<meta http-equiv="refresh" content="8;url=some_url" >';
$doc->addCustomTag($custom_tag);
?>
Bob
Thanks Bob..
It works..π.
Is it possible to show the "Thank you" message for ten seconds and then run a redirection code automatically to forward to a different location as per the choice made by the user.
Example of redirect code:
$mainframe =& JFactory::getApplication();
$country = JRequest::getString('country', '', 'post');
switch($country)
{
case 'Afghanistan':
$url = 'form1';
break;
case 'Akrotiri':
$url = 'form2';
break;
case 'Albania':
$url = 'form3';
break;
case 'Algeria':
$url = 'form1';
break;
}
$url = '../test/index.php?option=com_chronoforms&chronoform=' . $url;
$mainframe->redirect($url);
Thanks for the help
Hi ron,
You can't delay a $mainframe->redirect; but you can merge to two code snippets to set the value of the url in the custom tag.
Bob
Thanks for the reply Bob.
How to merge the two codes ? And how will that help? I am confused.
Please help.
Thanks
Ron
Hi Ron,
<?php
$country = JRequest::getString( 'country', '', 'post' );
switch ( $country ) {
case 'Afghanistan':
$url = 'form1';
break;
case 'Akrotiri':
$url = 'form2';
break;
case 'Albania':
$url = 'form3';
break;
case 'Algeria':
$url = 'form1';
break;
}
$url = JURI::base().'/index.php?option=com_chronoforms&chronoform='.$url;
$doc =& JFactory::getDocument();
$custom_tag = "<meta http-equiv='refresh' content='8;url={$url}'>";
$doc->addCustomTag( $custom_tag );
?>
Bob
Thanks a lot Bob π
It succeeded. This is exactly what I needed.
Thank you very much. GOD Bless you.
Ronπ
This topic is locked and no more replies can be posted.