How to Use Google Drive Uploader Field With Contact Form 7?

How to Use Google Drive Uploader Field With Contact Form 7?

The Connect Drive plugin enhances Contact Form 7 by adding an easy file upload feature. Users can send documents and images directly to your Google Drive, streamlining the collection process. With user-friendly settings, managing uploads becomes effortless, making this plugin essential for optimizing form handling.

Step-1: Installing the Plugin

  • Go to WordPress Plugins.
  • Click on Add New.
  • Search for Connect Drive.
  • Click Install and then Activate the plugin.

Step-2: Linking Google Account

  • Click on Google Drive.
  • Go to Settings.
  • Click on Add Account.
  • Select the Google Account you want to add.
  • Allow the necessary permissions.

Step-3: Enabling Contact Form 7 Integration

  • Go to the Connect Drive Plugin Dashboard.
  • Click on Settings.
  • Select Integrations.
  • Enable Contact Form 7.
  • Click Save Changes from the top right side of the settings page.

Step-4: Configure Upload Field

  • Click on Contact from the left sidebar.
  • Edit the existing contact form or create a new one.
  • Click on Google Drive Upload.
  • Select Module.
  • Click on Configure.

Step-5: Select Module

Select a module to continue to the next step. You can select the modules below while configuring:

  • File Browser
  • File Uploader

Step-6: Configure Source Tab

From the Source Tab, select a Google Drive folder where you want users to store their uploaded files. You have more options to customize depending on your needs and expectations.

  • Use Private Folder: Turn ON to upload the files in the private folder linked to the user. Note: If enabled, this module will be visible only to logged-in users.
  • Use ACF field Files: Enable this option to use the ACF field files dynamically as the source for the module. Enter the ACF field name in the ACF Field Key input box to use the files from the ACF field.
  • Enable Folder Selection: Enable this option to allow users to select the upload folder and upload files to the selected folder.
    • Select Default Folder: Select the default folder where the files will be uploaded if the user doesn’t select any folder.
    • Folder Selection Label: Set the label for the folder selection.

Step-7: Configure Filter Tab

From the Filter Tab, you can show/ hide any files or folders by including/ excluding their extensions and names.

  • Allowed Extensions: Enter comma (,) separated file extensions to allow, such as “jpg, png, gif”. Leave empty to upload all extension files. When “Allow all” is enabled, exceptions will not be uploaded.
  • Max File Uploads: Enter the max number of files to upload at once. Leave empty for no limit.
  • Min File Uploads: Enter the minimum number of files to upload. Leave empty for no limit.
  • Max File Size (MB): Enter the maximum upload file size (MB).
  • Min File Size (MB): Enter the minimum upload file size (MB).

Step-8: Configure Advanced Tab

From the Advanced Tab, you can customize module width and height, upload label text, and maximum/ minimum file sizes, and enable folder upload.

  • Module Container: Set the module container width and height. You can use any valid CSS unit (pixels, percentage), e.g., ‘360px’, ‘780px’, ‘80%’. Keep blank for the default value.
  • Show Upload Label Text: Show/ hide the upload files label text in the uploader box.
  • Upload Immediately: Start uploading files immediately after they are selected.

Step-9: Configure Notifications Tab

From the Notifications Tab, you can control notification-related settings. Ex: Email Notification of user actions.

  • Enable Notifications: Enable email notifications to get notified on various user activities (upload, download, delete, etc).
    • Upload Notification: Receive email notifications whenever someone uploads files through this module.
  • Notification Recipients: Enter the email address where the notifications will be sent. Add multiple email addresses by separating them with a comma (,). You can also set the placeholder tags below as email recipients.
    • Skip Current User Notification: Enable to skip the notification for the user who executes the action.

Step-10: Configure Permissions Tab

From the Permissions Tab, you can control permission-related settings. Follow the steps below to configure properly.

  • Upload: Allow users to upload files.
    • Overwrite Files: Enable overwriting files with the same name.
    • Enable Folder Upload: Allow users to upload folders. A folder upload button will be added.
    • Enable File Description: Allow users to add a description to the uploaded files.
    • Create Entry Folder: Create a folder for the files uploaded through this upload field.
    • File Name Template: Enter file name template to rename the file after upload.
    • Filter Users & Roles: Select users & roles who can upload files.
  • Enable Password Protection: Enable password protection for this module. Users will need to enter the password to access the module.
    • Password: Set the password for this module.
  • Display for: Select the user roles and specific users who are allowed to access the module.
    • Everyone: Display the module for everyone.
    • Logged In: Display the module for logged-in users only.
      • Filter Users & Roles: Select the users and user roles who can see the module.
      • Everyone Expect: When activated, the module will be visible to everyone except for those specifically exempted.
      • Show Denied Message: Show a message to users who don’t have access to the module.
      • Display Login Screen: Display a login message for the modules when authentication is required.

Step-11: Inserting Tag

Click Insert Tag > place tag where you want to display.

Step-12: Embed the Upload Field in WordPress

Copy the shortcode from Contact Form 7 and paste any page or post where you want to display the uploader.

Step-13: Upload Field Output

Here is what the uploading field will look like.