skip to Main Content

WordPress Code Snippets


Redirect After Submission in Gravity Forms

You can easily redirect users to a thank-you page after they submit the form in Gravity Forms. This improves user experience by confirming successful submissions.

add_action('gform_after_submission', 'codebykp_redirect_after_submission', 10, 2);

function codebykp_redirect_after_submission($entry, $form) {
    $redirect_url = home_url('/thank-you');
    wp_redirect($redirect_url);
    exit;
}


I’m a WordPress developer with 10+ years of experience in WooCommerce and custom plugins. I combine technical expertise with design flair to help you create standout, user-friendly websites. Let’s transform your digital presence!

Best WordPress Hosting
Back To Top
Search