• Resolved silvo37

    (@silvo37)


    Hello,

    On client’s website Im trying to implement custom action to one of wp forms on homepage above the footer with ID 18741.

    The code seems to be correct however after form submit, redirection do not happen.
    Could you pls help?
    I used snippet below in functions.php.

    /*
     * Return a specific URL on the form submission.
     *
     * @link https://wpforms.com/developers/how-to-customize-the-form-action/
    */
     
    function wpf_custom_form_action( $action, $form_data ) {
         
        if ( $form_data[ 'id' ] == '18741' ) {
     
            return 'https://seasonsnow.ecomailapp.cz/public/subscribe/1/(censored)';
     
        }
     
        return $action;
    }
     
    add_filter( 'wpforms_frontend_form_action', 'wpf_custom_form_action', 10, 2 );
    

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @silvo37 – Thanks for reaching out, and I apologize for the inconvenience.

    I looked into the code, and tested on my end and I was able to replicate the issue wherein the form does not seems to be redirecting. I’m checking this with the developers, and I’ll circle back with more details soon.

    In the meantime, if you have any questions, please feel free to reachout.

    Kindly,

    Hey @silvo37 – Thanks for the patience while I checked with the team. In this case for the code to work, you’ll have to turn off Ajax form submission under Settings > General > Advanced to allow the page to reload and redirect to the custom page. Here’s a screencast that you can take a look at to disable AJAX submission.

    Please let me know how it goes.

    Kindly,

    Plugin Support Kenneth Macharia

    (@kmacharia)

    Hi @silvo37

    We haven’t heard back from you in a while, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation (please just see my post above).

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom form action’ is closed to new replies.