Sitesao Support
  • Home
  • Themes
  • Plugins
  • Support

Support Forums

Home/Forums/Plugin & Extension/DHVC Form – WordPress Form with WPBakery Page Builder/External URl – Post

External URl – Post

This topic is: not resolved
  • July 18, 2018 at 3:10 pm #34589

    vargau
    Participant

    Hello

    I have a form that was posting to a external url the submitted data that was solved here in a old ticket.

    I have upgraded to DHVC Version: 2.2.0 and the bellow code doesn’t work anymore.

    function dhvc_form_before_processor_custom_redirect($form_id){
        if(isset($_POST['arrival']) && isset($_POST['departure'])){
            //Your form id
            $form_id = 896;
            //you external url
            $redirect_url = 'https://loletlola.book-onlinenow.net/index.aspx?Page=19&lan_id=ro-RO';
            //only send field name to external url
            $allow_fields = array(
                'arrival',
                'departure',
                'rooms',
                'adults',
                'adults'
            );
            foreach ($allow_fields as $allow_field){
                if(isset($_POST[$allow_field]) && !empty($_POST[$allow_field])){
                    $redirect_url = add_query_arg($allow_data,$_POST[$allow_field],$redirect_url);
                }
            }
            wp_redirect(urldecode_deep($redirect_url));
            die;
        }
    }
    add_action('dhvc_form_before_processor','dhvc_form_before_processor_custom_redirect');
    

    What would be the new functions.php code to make it work on DHVC version 2.2.0 ?

    Regards.


    Sorry, this forum is for verified users only. Please Login or Register to continue

Log In
Register Lost Password

Forums

  • Theme & Template
  • Plugin & Extension

Our Themes

Our Plugins

Tags

acf ajax Bug conditional logic css demo DHVC email Error footer form gallery Header Image Images layout login luxury mailchimp Menu mobile Modal newsletter Newsri not working page plugin product product page recaptcha shortcode Sidebar Single Product Page spam Submit Submit button template translate Translation update Visual Composer woocommerce Woo Detail Product Page Builder woow WPML
© Copyright Sitesao.com - Support Policy