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, such as when the form is being created an Administrator will be able to view the form on the front end before the form schedule has started or after the form schedule has passed if you have saved but un-submitted form entry an Administrator will be able to view the saved form.

You can use the code by adding it to your theme’s functions.php file (anywhere after the opening <?php line).

add_filter('gform_pre_render', function ($form) {
    if (current_user_can('manage_options' ) || current_user_can('gravityforms_view_entries')) {
        $form['scheduleForm'] = false;
    }
        return $form;
    }
);