Hello,
I have been using chronoforms since almost an year now and every day I learn something more. I am a medical doctor having no knowledge of coding but I am learning and when ever I make something work I feel very happy.😀
This time I want to edit this redirection code that Bob gave me once. It redirects to a chosen page when a selection is made. In this case it is as per country.
When a visitor chooses "Akrotiri" the url is directed to "usd_en_200e". I want to also enable more advanceses like when a country is chosen a state is also required and the redirection is as per country and state together. This I require so that proper more specific reply could be sent as per state of a country.
Could any one help me modify this code.
Thanks in Advance.
Ron
I have been using chronoforms since almost an year now and every day I learn something more. I am a medical doctor having no knowledge of coding but I am learning and when ever I make something work I feel very happy.😀
This time I want to edit this redirection code that Bob gave me once. It redirects to a chosen page when a selection is made. In this case it is as per country.
<?php
global $mainframe;
$case = JRequest::getString('country', '', 'post');
switch ($case) {
case 'Afghanistan':
default:
$url = 'inr_price_iecp';
break;
case 'Akrotiri':
$url = 'usd_en_200e';
break;
case 'Albania':
$url = 'euro_en_300e';
break;
case 'Algeria':
$url = 'bhd_en_400e';
break;
}
$url = 'index.php?option=com_chronocontact&chronoformname='.$url;
$mainframe->redirect($url);
?>
When a visitor chooses "Akrotiri" the url is directed to "usd_en_200e". I want to also enable more advanceses like when a country is chosen a state is also required and the redirection is as per country and state together. This I require so that proper more specific reply could be sent as per state of a country.
Could any one help me modify this code.
Thanks in Advance.
Ron