Home › Forums › Quform WordPress › Conditional Redirect in V1
Hi,
I tried the redirection thru a custom plugin, but it does not work. I made all as you described in the doc, but it just redirects to the default page I put in.
Thanks for your help, Martin
This is my code:
<?php /* * Plugin Name: Quform Custom Code * Description: Custom code for Quform. * Version: 1.0 * Author: The */ function my_conditional_form_redirect($url, $form) { $selection = $form->getValue('iphorm_16_1'); switch ($selection) { case 'abo_sp1': $url = 'http://linktosite.com'; break; case 'abo_sp2': $url = 'http://linktoothersite.com'; break; } return $url; } add_action('iphorm_success_redirect_url_16', 'my_conditional_form_redirect', 10, 2);
I just updated to v2.1 – so there is the option now for doing this.
New Version looks and works great!!!
Thanks for this Update Martin
— SOLVED —