Forums

How-to use CFv4 Event Switcher [GH] action

clovismmbr 13 Feb, 2014
Hello, i need a simple how-to use CFv4 Event Switcher [GH] action one or two examples. please.
GreyHead 13 Feb, 2014
Hi Clovis,

What do you need to do?

Bob
clovismmbr 13 Feb, 2014
Hello Bob, I need run differents action in submmit event based on value checked in radion buttom

example if radio1 is check: run email, dbsave and thank you page. else radio1 is checked: run email, dbsave, thank you page and save data to section redirect URL sending data to another site outside of my domain.

I will use for payment method. where radio1 is payment off-line and radio2 will run normal flow(email dbsave etc.) and for last will send some specific data to another payment site. Here in Brazil is knowing as UolPagSeguro https://pagseguro.uol.com.br/?psid=1&campanha=vendedor-web#rmcl
GreyHead 14 Feb, 2014
Answer
Hi Clovis,

Put all the 'shared' actions before the Event Switcher action, then add in the Event Switcher something like:
<?php
if ( $form->data['radio_button'] == 'UolPagSeguro' ){
  return 'event_a';
}?>
Then put the Redirect URL and Redirect User actions in the Event A box of the Event Switcher. Because it is a redirect you don't' need to use any other event. Put the remaining non-UolPagSeguro actions after the Event Switcher.

Bob
clovismmbr 16 Feb, 2014
Thank You very much Bob, you saved my life!
esl 03 Apr, 2014
I have been trying to use this but I havent gotten it to work... I did everything mentioned, and it was working but once I moved it to later in my form (page4) it doesn't display the correct html
GreyHead 04 Apr, 2014
Hi esl.

It should make no difference which page of your form it is on. Your post has no useful information to see what is happening.

Bob
esl 04 Apr, 2014
Thanks I was able to figure it out... I forgot to drag a multi-page action over... Thanks again!
esl 04 Apr, 2014
does the Event switcher work on CFv5 if not how would I accomplish this?
Max_admin 04 Apr, 2014
Yes it does, I have also added a FAQ on how to use it to the CCv5 FAQs section.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
diego.matos 27 Jun, 2014
Hi, Bob.
I'm trying to do the some as Clovis but I don't know to do.
I have 2 radion button and I want 2 differents e-mail in each one. I'm using the ChronoForms5.
I mounted this structure in the setup:
On load: show form
On Submit: email1, email2, display message and event switcher. Put in the event switcher the same Clovis code, but I know how do this differents actions to each radio button. I don't receive any e-mail.

Diego
Max_admin 27 Jun, 2014
Hi Deigo,

Please check how to use the "Event switcher" here:
https://www.chronoengine.com/faqs/70-cfv5/5212-event-switcher.html

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.