Hi,
I have a small form that should take the user to a specific place on the website based on two responses given in the form. Specifically, the user selects a date (dropdown) and a time (radio button). Once the user submits the form, it should go to the specific excursion page to purchase tickets. I am using Event Switcher to do this, but I am having difficulties getting it to work. It must be something with my code. 😢
Here's what I've done:
1. I've added an "event switcher" action to the On Submit event. Here's the php for the action:
P.S. I've also tried:
In the first code set, I just get a submitted form - essentially nothing happens, but the form is blank and the URL shows it was submitted / processed. The second code set I only get to the first date (july 27 at 1pm), no matter what I pick. 😲
In events a-d, I added a redirect user action to a specific URL. I also added a show stopper to Event d, each event (a-d), and the event switcher...all separately of course...nothing worked. I am not exactly sure where the show stopper needs to go though.
I am only trying this with the first 3 cases (July 27 at 1pm, July 27 at 3pm and July 28 at 11am), so right now I only have one event switcher, but in the end, I will have at least 3. Can someone tell me if I am at least on the right path.
specs:
Joomla v 2.5.8 and CF v4
location of the form: http://dev.lionstrainrides.com
Thank you so much for your help! Always greatly appreciated.
MC
I have a small form that should take the user to a specific place on the website based on two responses given in the form. Specifically, the user selects a date (dropdown) and a time (radio button). Once the user submits the form, it should go to the specific excursion page to purchase tickets. I am using Event Switcher to do this, but I am having difficulties getting it to work. It must be something with my code. 😢
Here's what I've done:
1. I've added an "event switcher" action to the On Submit event. Here's the php for the action:
<?php
switch ($form->data['excursion_date'],$form->data['departure_time']) {
case ('July27','1pm'):
return 'event_a';
break;
case ('July27','3pm'):
return 'event_b';
break;
case ('July28','11am'):
return 'event_c';
break;
default:
return 'event_d';
}
?>
P.S. I've also tried:
switch ($form->data['excursion_date' && 'departure_time']) {
case ('July27' && '1pm'):
return 'event_a';
break;
case ('July27' && '3pm'):
return 'event_b';
break;
case ('July28' && '11am'):
return 'event_c';
break;
default:
return 'event_d';
In the first code set, I just get a submitted form - essentially nothing happens, but the form is blank and the URL shows it was submitted / processed. The second code set I only get to the first date (july 27 at 1pm), no matter what I pick. 😲
In events a-d, I added a redirect user action to a specific URL. I also added a show stopper to Event d, each event (a-d), and the event switcher...all separately of course...nothing worked. I am not exactly sure where the show stopper needs to go though.
I am only trying this with the first 3 cases (July 27 at 1pm, July 27 at 3pm and July 28 at 11am), so right now I only have one event switcher, but in the end, I will have at least 3. Can someone tell me if I am at least on the right path.
specs:
Joomla v 2.5.8 and CF v4
location of the form: http://dev.lionstrainrides.com
Thank you so much for your help! Always greatly appreciated.
MC