How to make redirecting to paypal conditional

mazdak78 30 Sep, 2017
Hello,
Imagine if I have two button on my form.
I want if user click on buttton1, the form does everything that it does normally like saving to database, email and also redirecting to paypal. But if user click on Button2, everything that the form does happen, except redirecting to paypal. (I mean email, uploading file, save to datasbase,etc). How can I achieve this in Chronoform V6?

Thanks for your help
GreyHead 30 Sep, 2017
Hi mazdak78,

You can use an Event Switcher in the form On Submit event to check the value of the submit button and either redirect or not.

Bob
mazdak78 30 Sep, 2017
Thanks for the reply. I have addeda the Event Switcher, but I don not understand how should I work with it. For example in DATA PROVIDER, should I put the name of Paypal button and then how to check it? And then in A and B event, put redirect to paypal and redirect to thank you page?
GreyHead 01 Oct, 2017
Hi mazdak78,,

That sounds correct - I don't know much about CFv6 so I'd suggest that you use the DeBugger action to check what values are available to you to trigger the Event Switcher.

Bob
Max_admin 03 Oct, 2017
Hi,

Name your paypal button "button" and set its value "paypal", then in the event switcher, set the "events" to "paypal", and the data provider to {data:button}

Click "apply events" and drag the paypal action inside the paypal event of the event switcher.

Best 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.