I am running a conference later this year and I am giving people the choice of paying by check, bank draft or PayPal/credit card. I have placed a radio button with these choices. When they submit their form can this choice be read so that they are directed to different pages for each of these choices.
Thank you.
Thank you.
Hi Skirsch,
Yes you can do that using the ReDirect URL + ReDirect User actions; or the Show Form action with the Event Switcher [GH] action or just plain PHP in a Custom Code action.
Bob
Yes you can do that using the ReDirect URL + ReDirect User actions; or the Show Form action with the Event Switcher [GH] action or just plain PHP in a Custom Code action.
Bob
Hi Bob,
Thank you for this information. Chronoforms is very powerful. I am experimenting with the event handler.
In your instructions you say "The Event Switcher has four events A, B, C, and D. If the action code returns 'event_a' then Event A is enabled."
I am not sure how to put the action code in. I have a variable [methode] in a radio button that can return the action codes. How is this linked to the Event Switcher?
Thank you.
Thank you for this information. Chronoforms is very powerful. I am experimenting with the event handler.
In your instructions you say "The Event Switcher has four events A, B, C, and D. If the action code returns 'event_a' then Event A is enabled."
I am not sure how to put the action code in. I have a variable [methode] in a radio button that can return the action codes. How is this linked to the Event Switcher?
Thank you.
Hi SKirsch,
You'll need to add some PHP in the Code box of the Event Switcher - something like this
Bob
You'll need to add some PHP in the Code box of the Event Switcher - something like this
<?php
if ( $form->data['methode'] == 'x' ) {
return 'event_a';
} elseif ( $form->data['methode'] == 'y' ) {
return 'event_b';
} elseif ( $form->data['methode'] == 'z' ) {
return 'event_c';
}
?>
Bob
Hi Bob,
Thanks for the info. I have put the code choice in a custom code box in the on summit actions.
In my event switcher I have different show thank you messages for a, b, c.
When I fill in the form and then submit I come up with my Joomla template but no form. Not sure where is the problem.
Thanks for your help.
Thanks for the info. I have put the code choice in a custom code box in the on summit actions.
In my event switcher I have different show thank you messages for a, b, c.
When I fill in the form and then submit I come up with my Joomla template but no form. Not sure where is the problem.
Thanks for your help.
Hi SKirsh,
Why have you put the code in a Custom Code action instad of the Event Switcher action? That may be the problem.
Bob
Why have you put the code in a Custom Code action instad of the Event Switcher action? That may be the problem.
Bob
Thanks Bob,
You were right the code needs to go in the event switcher code box, I had not realized that it existed.
I am having one last problem with the code your suggested
<?php
if ( $form->data['methode'] = 'VRTAB' ) {
return 'event_a';
} elseif ( $form->data['methode'] = 'CHQAB' ) {
return 'event_b';
} elseif ( $form->data['methode'] = 'PAY' ) {
return 'event_c';
}
?>
It is only returning the first if statement whether it is true or not. I have tested the radio buttons without the event switcher and they work fine with the three conditions. Something seems to hang up here, even if the statements look good.
Any idea ?
Thank you
You were right the code needs to go in the event switcher code box, I had not realized that it existed.
I am having one last problem with the code your suggested
<?php
if ( $form->data['methode'] = 'VRTAB' ) {
return 'event_a';
} elseif ( $form->data['methode'] = 'CHQAB' ) {
return 'event_b';
} elseif ( $form->data['methode'] = 'PAY' ) {
return 'event_c';
}
?>
It is only returning the first if statement whether it is true or not. I have tested the radio buttons without the event switcher and they work fine with the three conditions. Something seems to hang up here, even if the statements look good.
Any idea ?
Thank you
Hi Skirsch,
My mistake, it needs to be == in each case:
Bob
My mistake, it needs to be == in each case:
$form->data['methode'] == 'VRTAB' )
I updated my earlier post.Bob
This topic is locked and no more replies can be posted.