Gravity Forms skip form if already filled out using cookie?

Here’s some code on how you could simply leverage the gform_after_submission hook of Gravity Forms to set a cookie based on your form ID once submitted, then check for that on the confirmation page by hooking into template_redirect.

In order to customize the functionality, you’ll want to look at the docs for setcookie, gform_after_submission and template_redirect.

For the form

// Make sure to swap out {your_form_id} with the ID of the form.

add_action( 'gform_after_submission_{your_form_id}', 'wpse_set_submitted_cookie', 10, 2 );

function wpse_set_submitted_cookie( $entry, $form ) {

    // Set a third parameter to specify a cookie expiration time, 
    // otherwise it will last until the end of the current session.

    setcookie( 'wpse_form_submitted', 'true' );
}

For the page

add_action( 'template_redirect', 'wpse_protect_confirmation_page' );

function wpse_protect_confirmation_page() {
    if( is_page( 'my-confirmation-page' ) && ! isset( $_COOKIE['wpse_form_submitted'] ) ) {
        wp_redirect( home_url( '/my-form/' ) );
        exit();
    }
}