简体   繁体   中英

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.

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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM