How to allow Administrators to access Gravity Forms outside of form schedule

The following code will allow Adminstrators and users that have access to view form submissions to view a form outside of the form schedule.

This can be useful at both sides of a form schedule, for example to allow an Administrator to view the form on the front end before the form schedule has started or after the form schedule has passed the scheduled period.

This also allows an Administrator to view saved forms using the ‘save and continue later’ after the scheduled period..

If you’re not sure where to place this code I highly recommend you read How to create a WordPress plugin for your custom functions.

add_action( 'gform_pre_render', 'administrator_view_scheduled_form' );
add_action( 'gform_pre_validation', 'administrator_view_scheduled_form' );

function administrator_view_scheduled_form( $form ) {
    if ( current_user_can( 'manage_options' ) || current_user_can( 'gravityforms_view_entries' ) ) {
        $form['scheduleForm'] = false;
    return $form;