PHP code help: switch based on two variables

damconsulting 18 Apr, 2017
Hi, I'm using CF5 for a website where I have 2 dropdown: the first named 'language_switch' and the second named 'page_switch'.
I'd like to use it to select languages and products and then activate different redirect events on submit button.
I followed this tutorial and it works fine if i use only one variable.

But I'm in the need to use 2 variables and I'm not able to concatenate choices...
I try to use switch function but I don't know PHP...

switch ($form->data[‘language_switch’] && $form->data['page_switch']) {
  case ‘ita’ && ‘option_01’:
  default:
    return ‘option_01_ita’;
    break;
  case ‘eng’ && ‘option_01’:
    return ‘option_01_eng’;
    break;
......
}
?>


Any help will be appreciated and I can pay for it.
Thank you.
Max_admin 19 Apr, 2017
Hi DAM,

I have posted a reply here:
http://www.chronoengine.com/forums/posts/t103348.html#367113

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.