Hello
Can I use in switch action switching field like this ?
Thanks
Ron
Can I use in switch action switching field like this ?
'AF'.'Afghanistan'=url/path/file/self.phpI have a special path for every country and making a switch for 'Select' and 'Unselect' would mean making over 500 events. Is there a shorter way to do it ? I have a php code for it which I am using in CFV5 but it does not seem to work in CFV6.
Thanks
Ron
Just fix your PHP code. I assume you have something like
$form->data["field"]When in v6 it should be
$this->data("field")
Here is the complete code that works withCFV5.
Thanks for the help
Ron
<?phpI tried it in custom code CSV6 and also in php block it does not work.
$app = JFactory::getApplication();
$country = $app->input->getString( 'country', '', 'post' );
switch ( $country ) {
case 'AF' . 'Afghanistan':
$url = 'intl_deal1';
break;
case 'AL' . 'Albania':
$url = 'intl_deal2';
break;
default:
$url = 'intl_deal_aprox';
}
$url = JURI::base() . 'index.php?option=com_chronoforms6&chronoform=' . $url;
?>
Thanks for the help
Ron
Get country with the syntax I gave you
This topic is locked and no more replies can be posted.