Buy Now
Sign in

Event Switcher 2 actions

diego.matos , June 27 2014, 17:46
D
diego.matos 18
June 27 2014, 17:46 #332538
Hi.
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
calculus00 1
June 27 2014, 17:46 #332539
 1
Hello diego.matos,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Event switcher
What are Form Events and Actions?
P.S: I'm just an automated service
I'm an automated service, my answers may help, but they may not be accurate.
D
diego.matos 18
June 27 2014, 18:28 #332545
Hello, Calculus00
Thanks for the help, but still does not solve my problem.
D
diego.matos 18
June 27 2014, 19:27 #332558
 Answer
Problem solve.
My mistake was in my if inside of the event switcher.

<?php
if($form->data["radio_button"] == "variavel"){
return "success";
}else{
return "fail";
}

thanks
G
gmonasterio 3
August 19 2014, 22:28 #334834
Diego

I am having the same problem, but could not manage to solve it
I created an Event Switch, where the user choose between two payment methods: Online and Offline. Depending on the button he/she chooses, it redirects to an article in Joomla site.

radio button ID is named pagamento. The options 0=Online, 1=Offline
Below is the code for the Event SwitchI adapted from Diego. (I do not know how anything about php, just copied the code)

<?php
if($form->data['pagamento'] == 'Online'){
return 'Online';
}else{
return 'Offline';
}
?>

The structure of the form is in the attachment: printscreen.png

What am I doing wrong? The brackets on the code maybe??

Thanks in advance.

Attachments
printscreen.png
printscreen.png
(70.87 KiB)
1580 Downloads/Views
admin 28
August 19 2014, 22:31 #334836
No, you should use the correct values, so you should use 0 or "0" because this is value of the dropdown option:
if($form->data['pagamento'] == 0){


Regards,
Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
gmonasterio 3
August 19 2014, 23:35 #334842
Thanks Max for the prompt response.

I have modified the code of the Event Switch as you suggested:
<?php
if($form->data['pagamento'] == 1){
return "Online";
}else{
return "Offline";
}
?>


Now it works for 1=Online, but when the 0=Offline radio button is marked, it jumps to the e-mail and message events, skiping the Offline Redirect.

Any hint?
admin 28
August 20 2014, 04:41 #334843
There is no reason for this to happen, please double check that the redirect action in the "offline" event is configured correctly ?
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
G
gmonasterio 3
August 20 2014, 11:59 #334862
I have redone the Redirect and it worked fine.

Thanks Max for your helpful hints!

Best Regards
D
dariegler 42
January 19 2015, 01:32 #341462
i am trying something similar with no success. i cannot get the on offline and on online events inside of on submit, i want to run paypal redirect if online is selected. any ideas? :?
GreyHead 64
January 19 2015, 10:46 #341472
Hi dariegler,

How do you have the Event Switcher set up?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
GreyHead 64
January 19 2015, 10:46 #341473
Hi dariegler,

How do you have the Event Switcher set up?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
dariegler 42
January 19 2015, 15:00 #341487
i have a yes no choice(checkbox group) in the design and then in the on submit, i have event switcher and i am checking the value of the payment variable and setting to true if Paypal and false if not. i t appears to ignore the event check.
admin 28
January 19 2015, 15:21 #341489
Please try a "Radio" button group and post your code if it doesn't work!

If possible please post your radio boxes options too!
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
D
dariegler 42
January 19 2015, 15:54 #341495
the radio worked, but if i cancel the paypal transaction it does not return to the site. It returns a blank page. i have the url of the site in the return field.

http://www.owrc.net/index.php?option=com_chronoforms5&chronoform=febreservation
GreyHead 64
January 20 2015, 10:25 #341521
Hi dariegler,

PayPal uses a Cancel URL for cancellations. I think that you can add that in the Extra Params box on the Advanced tab of the action. Something like:
cancel_return=http://www.owrc.net/index.php?option=com_chronoforms5&chronoform=febreservation&event-pp_cancel
or:
cancel_return=http://www.owrc.net/index.php?option=com_chronoforms5&chronoform=febreservation&event-pp_return&status=cancel

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
dariegler 42
January 20 2015, 14:14 #341530
neither one worked.
dave
GreyHead 64
January 21 2015, 11:04 #341558
Hi dariegler,

How do you know exactly? What happens when you cancel?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
dariegler 42
January 21 2015, 14:14 #341580
i just get a blank screen. this is what is in the url at the return

https://www.paypal.com/us/cgi-bin/merchantpaymentweb?dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198d8562aa8a3da7ac30bbfba73b3e80dcc

what else can i give you?
admin 28
January 21 2015, 16:26 #341590
Did you try the "return url" setting in the PayPal action ? I think the parameter name is "return_url".
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!