Conditional Redirect in V1

Home Forums Quform WordPress Conditional Redirect in V1

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24426
    a2c
    Participant

    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);
    #24427
    a2c
    Participant

    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

    #24428
    a2c
    Participant

    — SOLVED —

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy