### [wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives](https://wpforms.com/developers/wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives/)

**Published:** August 12, 2025
**Author:** David Ozokoye

**Content:**

## Description

The `wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives` let’s you display directories from shared drive folders on your Google account.

## Parameters

ParameterTypeDescription`$form``object`WP\_Post object containing all form settings and fields.`$is_enabled``bool`Boolean to specify whether shared drives are enabled for the Google Drive provider.## Source

`wpforms-google-drive/src/Provider/Settings/FormBuilder.php`

## More Information

This filter allows you to choose directories from shared folders when connecting the [Google Drive addon](https://wpforms.com/docs/google-drive-addon/) to a form on your site. It controls whether shared drives are enabled or disabled for the Google Drive integration in the form builder interface.

## Examples

```

/**
	* Display shared drives in Google Picker.
	*
    * @link https://wpforms.com/developers/wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives/
	* @since {VERSION}
	*
	* @param bool    $is_enabled Display Shared Drives directories.
	* @param WP_Post $form       Current form.
*/

add_filter( 'wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives', '__return_true' );
```

The snippet above will apply the functionality to all forms on your website. If you’d like to apply the filter to a specific form, use the snippet below:

```

function wpf_shared_google_drive_form ( $is_enabled, $form ) {
    // Enable shared drives only for form ID 123
    if ( $form->ID === 123 ) {
        return true;
    }
   
    return $is_enabled;
}

add_filter( 'wpforms_google_drive_provider_settings_form_builder_enabled_shared_drives', 'wpf_shared_google_drive_form', 10, 2 );
```

Be sure to replace **123** in the snippet above with your actual form ID. See our tutorial if you need help [retrieving your form ID](https://wpforms.com/developers/how-to-locate-form-id-and-field-id/).

**Categories:** Filters Hooks

**Tags:** Google Drive, PHP

---

