Hello,
I would like to use a Promotional code for my best customers.
I think to create a very simple form with 2 fields + submit button
. Enter the Code
. you have no code
If they have the right code -> go to the "promotionnal form"
If they don't -> go to the "normal form"
Is it easy to build?
I've searched help in the forum, but my english is not good and i have no knowledges of php coding.
Regards
I would like to use a Promotional code for my best customers.
I think to create a very simple form with 2 fields + submit button
. Enter the Code
. you have no code
If they have the right code -> go to the "promotionnal form"
If they don't -> go to the "normal form"
Is it easy to build?
I've searched help in the forum, but my english is not good and i have no knowledges of php coding.
Regards
Hi opalepsi,
The simplest way of doing this is to use three separate forms. In the On Submit event for the first form use my Event Switcher [GH] action to check the code; if it's valid use a Show Form action to redirect to Form 2; if not redirect to Form 3.
Please see this FAQ for more on conditional actions.
Bob
PS You can do it in one multi-page form, that's neater but no so simple to set up.
The simplest way of doing this is to use three separate forms. In the On Submit event for the first form use my Event Switcher [GH] action to check the code; if it's valid use a Show Form action to redirect to Form 2; if not redirect to Form 3.
Please see this FAQ for more on conditional actions.
Bob
PS You can do it in one multi-page form, that's neater but no so simple to set up.
Hi Bob,
Thanks for your answer.
I have installed the "If_then_else" action.
First, i have create a little form with a Radio Box and apply redirect conditions with the "If_then_else" action.
It works!
Then, i have added a field "promo code", in one of my form, by using the "security question field"
and it works!
When i'm testing this in the "Frontend View" option it works perfectly.
So, i've created an article, and i've loaded the first form inside.
It works!
But when i chose an option for loading the next form... it doesn't works! 😢
I've got this message: Fatal error: Class 'JParameter' not found in /homez.707/edenvoya/www/administrator/components/com_chronoforms/form_actions/if_then_else_st/if_then_else_st.php on line 71
I don't understand what is the problem.
Compatibility problem with another extension?
Could you give me a help? :wink:
Thanks a lot.
Thanks for your answer.
I have installed the "If_then_else" action.
First, i have create a little form with a Radio Box and apply redirect conditions with the "If_then_else" action.
It works!
Then, i have added a field "promo code", in one of my form, by using the "security question field"
and it works!
When i'm testing this in the "Frontend View" option it works perfectly.
So, i've created an article, and i've loaded the first form inside.
It works!
But when i chose an option for loading the next form... it doesn't works! 😢
I've got this message: Fatal error: Class 'JParameter' not found in /homez.707/edenvoya/www/administrator/components/com_chronoforms/form_actions/if_then_else_st/if_then_else_st.php on line 71
I don't understand what is the problem.
function run( $form, $actiondata )
{
$params = new JParameter( $actiondata->params );
// Check the expression
$expression = trim( $params->get( 'expression', "" ) );
$enabled = trim( $params->get( 'enabled', true ) );
$actionlabel = trim( $params->get( 'action_label', "" ) );
Compatibility problem with another extension?
Could you give me a help? :wink:
Thanks a lot.
I've tried to use your "Event Switcher" and it works! 😀
Juste have to make better settings and it will be perfect.
Thanks a lot Bob.
Juste have to make better settings and it will be perfect.
Thanks a lot Bob.
This topic is locked and no more replies can be posted.