Hide gravity forms

Try this;

<?php 

    $user = wp_get_current_user();

    if ( count_user_posts( $user->ID ) >= 1 ) {

        // echo your text snippet

    } else {

        // echo your form

    }

?>

1) wp_get_current_user() returns the WP_User object which includes many properties for that user.

2) Since we only want the ID of the current user, we assign a variable of choice, in this instance $user which is equal to that of i.e. $user = wp_get_current_user().

3) Then we can grab the current user ID simply by declaring $user->ID

4) We pass $user->ID to our count_user_posts( $user->ID) function which is then measured against our condition being greater than or equal to 1 post.

5) Do your thing…

References: