Hello
I have been using chronoforms V5. After update I have run into some problem. In one of my forms I have a custom code that uses this script : It now does not redirect as per case but just goes to the default URL.. I am not able to find where am I going wrong. Could I get some help ?
Thanks
Ron
I have been using chronoforms V5. After update I have run into some problem. In one of my forms I have a custom code that uses this script : It now does not redirect as per case but just goes to the default URL.. I am not able to find where am I going wrong. Could I get some help ?
<?php
$country = JRequest::getString( 'country', '', 'post' );
switch($country)
{
case 'Afghanistan':
$url = 'sorry_intro';
break;
case 'Akrotiri':
$url = 'okay_intro';
break;
case 'Albania':
$url = 'okay_intro';
break;
case 'Algeria':
$url = 'on_new_intro';
break;
case 'American Samoa':
$url = 'okay_intro';
break;
case 'Andorra':
$url = 'sorry_intro';
break;
default:
$url = 'intl_details';
}
$url = JURI::base().'index.php?option='.$url;
$doc =& JFactory::getDocument();
$custom_tag = "<meta http-equiv='refresh' content='5;url={$url}'>";
$doc->addCustomTag( $custom_tag );
?>
Thanks
Ron
Hi Ron,
Max hijacked $doc and used it in CFv5 - please try changing the last part of your code like this
Bob
Max hijacked $doc and used it in CFv5 - please try changing the last part of your code like this
$url = JURI::base().'index.php?option='.$url;
$jdoc = \JFactory::getDocument();
$custom_tag = "<meta http-equiv='refresh' content='5;url={$url}'>";
$jdoc->addCustomTag( $custom_tag );
?>
Bob
Thanks Bob..
But I get a Syntax error on this link
But I get a Syntax error on this link
$jdoc = /JFactory::getDocument();
Thanks Bob,
I tried it no syntax error but as usual it just redirects to the default..
Please help
Ron
I tried it no syntax error but as usual it just redirects to the default..
Please help
Ron
This topic is locked and no more replies can be posted.