php - Quform Conditional dropdown page navigation -


quform wordpress plugin similar gravity forms. created form 2 dropdown input fields. first field product category , second field product.

    function my_conditional_form_redirect($url, $form) { $selection = $form->getvalue('iphorm_3_2'); switch ($selection) {        case 'nextech® "r" series valves':         $url = '/products/trunnion-ball-valves/trunnion-nextech-r/';         break;     case 'nextech® "e" series valves':         $url = '/products/trunnion-ball-valves/trunnion-nextech-e/';         break;     case 'truntech® valves':         $url = '/products/trunnion-ball-valves/truntech/';         break;     case 'pulsejet low emission valves':         $url = '/products/low-emission-valves/';         break;           }       return $url; }  add_action('iphorm_success_redirect_url_3', 'my_conditional_form_redirect', 10, 2); 

the code above works, works first product category , products. if other product category selected link goes category 1, product 1.

in code says "iphorm_3_2" it's referring qufrom id 3 , field id 2.

i've tried multiple variations no success, appreciated.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -