🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Cloud File Picker Premium Add-on Setup Guide

Updated 9 min read Gravity Forms Files, Storage & Databases
On this page
  1. Video walkthrough
  2. What you need
  3. Which services are included
  4. Install and activate
  5. Add your Google Drive keys
  6. What the Google permission covers
  7. Add your Dropbox key
  8. Add the field to a form
  9. Shared link or copy of the file
  10. The shared link only
  11. A copy of the file on this site
  12. The Google access token
  13. What the visitor sees
  14. Where the files show up
  15. How this differs from the other GravityExtra file add-ons
  16. Good to know
  17. Troubleshooting
  18. Frequently asked questions
  19. Do I need to share my keys with GravityExtra?
  20. Does it work with conditional logic, multi-page and AJAX forms?
  21. Can I accept only Dropbox?
  22. What happens if my license expires?

Video walkthrough

Gravity Forms Cloud File Picker Setup Guide: Google Drive & Dropbox Keys (WordPress Side)
Video setup guide: Gravity Forms Cloud File Picker Watch on YouTube

The Gravity Forms Cloud File Picker Premium Add-on adds a field to your forms that lets a visitor attach files from Google Drive or Dropbox with the file picker of the service itself. The visitor does not have to download a file to the phone or computer first and then upload it again. They press a button, choose the file in their own storage, and it is attached to the form.

You decide what the entry keeps for each file: the shared link, or a copy of the file that your server downloads, checks and stores in the normal Gravity Forms upload folder. You use your own Google and Dropbox app keys. Nothing goes through GravityExtra.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • An active license key for this add-on.
  • For Google Drive: a Google Cloud project where you turn on the Google Picker API and the Google Drive API, with an API key and an OAuth client ID (type Web application).
  • For Dropbox: an app in the Dropbox App Console and its App key.
  • An HTTPS site. Both services refuse pickers on plain HTTP pages.

Which services are included

Version 1.0.0 has Google Drive and Dropbox. Microsoft OneDrive is not included. The OneDrive file picker needs an app that visitors from any Microsoft organization can approve, and Microsoft does not let people in other organizations approve a new multi-tenant app unless its publisher has been verified through the Microsoft AI Cloud Partner Program. That is a partner verification step outside your site, so the add-on leaves it out instead of shipping a button that fails for most visitors.

Install and activate

  1. Install and activate the add-on like any plugin, after Gravity Forms.
  2. Open Forms → Settings → Cloud File Picker and enter your license key.

Add your Google Drive keys

You do this once, in the Google Cloud console, with your own Google account:

  1. Create a project (or pick an existing one) and note its project number.
  2. In APIs & Services → Library, turn on the Google Picker API and the Google Drive API.
  3. In Credentials, create an API key. Restrict it to your site address (HTTP referrers) and to the Google Picker API.
  4. In Credentials, create an OAuth client ID of type Web application. Under Authorised JavaScript origins add your site address, for example https://yourshop.com. No redirect address and no client secret are needed.
  5. On the OAuth consent screen add your app name and support email, add only the scope drive.file, and set the publishing status to In production. While it says Testing, only the people on your test list can sign in.
  6. In WordPress open Forms → Settings → Cloud File Picker, paste the client ID, the API key and the project number, and save.
The Cloud File Picker settings page in Gravity Forms with the Google client ID, API key and project number and the Dropbox app key
Your own Google and Dropbox keys.

What the Google permission covers

The add-on asks for one permission only: drive.file. Google lists it as a non-sensitive scope, which means it does not go through the extra review that sensitive and restricted scopes need. It gives the app access only to the files the visitor picks in the picker, never to the rest of their Drive. If you want a logo and a custom name on the consent screen, Google may ask you for its basic brand verification; that is done in your own Google Cloud project and is separate from this add-on.

Add your Dropbox key

  1. Open the Dropbox App Console and create an app (Scoped access; the access type does not matter for the Chooser).
  2. On the Settings tab, add your site address under Chooser/Saver domains.
  3. Copy the App key into Forms → Settings → Cloud File Picker and save.

Dropbox states that using the Chooser does not require production approval.

Add the field to a form

In the form editor open Advanced Fields and add Cloud File Picker. The usual settings (label, description, required, conditional logic, CSS class) work as for any field. The Cloud File Picker block adds these:

The Cloud File Picker settings in the Gravity Forms form editor: services, what is stored, accepted file types, largest file and most files
The field settings in the form editor.
  • Google Drive and Dropbox: which buttons show. A button shows only when its keys are saved.
  • What is stored: The shared link only or A copy of the file on this site.
  • Accepted file types: a list such as pdf, docx, png. Script and web page types are never accepted, whatever you type.
  • Largest file (MB): from 1 to 100, default 10.
  • Most files: from 1 to 20, default 3.
A Gravity Forms project brief with a Cloud File Picker field: buttons to choose from Google Drive and Dropbox, and two chosen files listed with a Remove button
The field on a form after two files were chosen.

The entry stores the address that the service gives for the file, for example a Drive link or a Dropbox link. Your server never contacts Google or Dropbox. This is the lightest option, and it respects the visitor’s own sharing: the link opens only for people who have been given access to the file in the visitor’s storage. If the file is private to the visitor, you will see the link but not the file. Tell your visitors to share the file with your team, or use the copy option.

A copy of the file on this site

When the form is submitted, your server downloads each file, checks it and stores it in the Gravity Forms upload folder of the form, just like a file from the File Upload field. The entry shows a link to the stored copy. This is the safest choice when you must keep the file even if the visitor later deletes it or changes its sharing.

The server does these checks before anything is stored:

  • Allowed addresses only. Google files are read from the Google Drive interface using the file ID, never from an address the browser sends. Dropbox files are read only from dropbox.com and dropboxusercontent.com. Every redirect is checked again, a redirect to any other host is refused, and so are loops (five hops at most).
  • Size. For Google the size is read from Drive before the download starts, and every download is cut off at the limit. The size the browser reports is never trusted.
  • Type. The extension must be in your list, must not be a script or web page type, and WordPress compares the real content of the file with the extension, so a web page renamed to .png is refused.
  • Name. The name is cleaned: no folders, no strange characters and no hidden second extension such as .php.jpg.
  • Nothing half done. A problem with any file stops the submission with a clear message and nothing is stored. Temporary files are always deleted.

Google documents (Docs, Sheets, Slides) have no file of their own; in copy mode they are exported as PDF. Folders are not accepted.

The Google access token

In copy mode the visitor’s browser sends the short-lived Google access token with the form so that your server can read the picked file. The token is used for that one submission and is never stored in the entry, a log or the database. In link mode no token is sent at all.

What the visitor sees

  1. Buttons Choose from Google Drive and Choose from Dropbox.
  2. A press opens the picker of the service. The first time, Google asks the visitor to allow access; Dropbox asks them to sign in.
  3. The chosen files appear in a list with a Remove button. The visitor can add more up to your limit and mix both services.
  4. The browser checks type, size and count straight away and says which file was refused and why.

The buttons are real buttons: they work with the keyboard, have visible focus, are at least 44 pixels high and fill the width on a phone. Nothing from Google or Dropbox is loaded when the page opens. Their scripts load only when the visitor presses a button.

Where the files show up

  • Entry detail: each file as a link with the service and whether a copy is on your site.
  • Entries list: the file names.
  • Merge tags: the field merge tag gives the addresses, one per line, for notifications and confirmations.
  • Export: the addresses, separated by commas.
  • Delete: when you delete an entry the add-on deletes the copies it stored for it, and only those, only inside the Gravity Forms upload folder.

How this differs from the other GravityExtra file add-ons

The Dropbox, OneDrive and Google Drive add-ons send files that visitors submitted to your storage. Cloud File Picker works the other way round: it lets visitors bring files from their storage into the form. Upload Tools and Large File Uploads work with files from the visitor’s own device. The add-ons can be used together.

Good to know

  • A link is only as open as the visitor’s sharing. Use the copy option when you must be able to read every file.
  • Dropbox direct links expire after four hours. In copy mode your server downloads at submission, so this does not matter. In link mode the add-on asks for the permanent preview link.
  • Google file names and types are read from Google when you keep a copy; the name stored in the entry is the one Google reports.
  • Very large files are better sent with the Large File Uploads add-on. The 100 MB ceiling protects your server’s memory and time limits.
  • Ad blockers or a strict Content Security Policy can block the picker scripts. The visitor sees a message that the service could not be loaded. Allow apis.google.com, accounts.google.com, *.google.com and www.dropbox.com if you use a policy.

Troubleshooting

  • The field shows a dashed note to editors and nothing to visitors: the keys of the chosen service are missing. For Google all three values are needed.
  • Google says the app is blocked or access denied: the origin is missing in the OAuth client, the consent screen is still on Testing and the visitor is not on the test list, or the API key is restricted to the wrong site.
  • Dropbox says the domain is not allowed: add the exact site address under Chooser/Saver domains.
  • Copy mode: the cloud service did not allow the download: the visitor’s link or token expired, or the file was removed. Ask them to choose the file again.
  • A file is refused as the wrong type although the name is right: the content does not match the extension, or your site does not allow that type for uploads.

Frequently asked questions

Do I need to share my keys with GravityExtra?

No. The keys stay in your site settings. The Google client ID, API key and Dropbox app key are not secrets (they appear in the page for the picker to work); restrict them in the consoles as described above. There is no client secret.

Does it work with conditional logic, multi-page and AJAX forms?

Yes. The list of chosen files is kept when the visitor moves between pages.

Can I accept only Dropbox?

Yes. Untick Google Drive in the field settings, or just leave the Google keys empty.

What happens if my license expires?

The field is hidden from visitors until the license is active again. Existing entries keep their links and copies.

See the Cloud File Picker add-on

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr