Gravity Forms submit the form data and then redirect to the custom form action URL?

I want to submit gravity form, then redirect to the Custom form action URL(redirects to payment gateway) where i want to send the form data.

When the user submits the gravity form submits the necessary data through POST to Custom form action url, Alternatively it should submit the form.

I really appreciate your help.

1 answer

  • answered 2021-06-18 23:34 Phil

    Look into the gform_confirmation filter, it allows you to change the confirmation message or redirect URL for a form.

    add_filter( 'gform_confirmation', 'custom_confirmation', 10, 4 );
    function custom_confirmation( $confirmation, $form, $entry, $ajax ) {
        if( $form['id'] == '1' ) {
            $confirmation = array( 'redirect' => 'http://www.website.com' );
        }
        return $confirmation;
    }