Super Forms
  • Drag & Drop Form Builder for WordPress
  • Quick start
    • Installation
    • Registration
    • Starting your 15 day trial
    • Purchasing a license
    • Activating a license
    • First time setup
    • Secure file uploads
    • Creating a form
    • Adding form elements
    • Editing elements
    • Publishing your form
    • FAQ
  • Account
    • Dashboard
      • Your Invoices
      • Billing details
      • Your Licenses
      • E-mail Notification
      • Password reset
      • Cancel subscription
  • Common problems
    • Common problems
      • Email delivery problems
        • Why is my form not sending emails?
        • Why are emails going into spam folder/inbox?
      • File upload problems
      • Session expired
      • reCaptcha Troubleshooting – Fix “Not Loading” & Verification Errors
  • Elements
    • Layout elements
      • Column/Grid
      • Multi-part / step
    • Form elements
      • Calculator
      • Signature
      • File upload
      • Datepicker
      • Variable field
      • Dropdown
      • Text field
      • Autosuggest
      • Keywords
      • Radio button
      • Keyword Field
      • Button
      • Audio Recording (microphone)
    • HTML elements
      • Heading
      • HTML (raw)
      • Image
      • TinyMCE
      • Divider
      • Spacer
      • PDF page break
      • Google map element WordPress form
  • Features
    • Basic
      • Confirmations emails
      • Save Form Progression (continue later)
      • Build In Translation System
      • Populate form
      • Popups
      • Import & Export
      • Hide form after submitting
      • Hide or lock out user from your forms
      • Validation
    • Advanced
      • WordPress form with Google sheets dropdown
      • Custom registration form for WordPress
      • Custom login form for WordPress
      • Custom lost password form for WordPress
      • Update current logged in user
      • Secrets
      • Prevent duplicate entries
      • Lock & hide form
      • Password protect
      • Conditional Logic
      • Tags system
      • Address lookup/auto complete
      • Analytics Tracking
      • Conversion Tracking
      • Distance & Duration Calculation
      • If statements
      • Foreach loops
      • E-mail Reminders
      • Variable Fields
      • Form templates - Include elements into other forms - WordPress
      • Transferring data from one form to another
    • Integrations
      • PDF Generator
      • Listings
      • WooCommerce Checkout
        • Fixed price checkout
        • Dynamic price checkout
        • Variable product checkout (variations)
        • Replacing the "Add to cart" on a product page with a form
        • Hiding product from shop and order via custom form
      • PayPal
      • MailChimp
      • Mailster
      • Zapier
      • Stripe (BETA)
      • WooCommerce Instant Order (in progress)
  • Tutorials
    • WordPress Form to Google Sheet Integration
    • GDPR Consent / Terms agreement
    • How to update the plugin
    • Sending emails to specific department for WordPress contact forms
  • Example Forms for WordPress
    • Booking 24 hours ahead of time
  • Developers
    • Code Examples
      • Lookup City by Zipcode for your WordPress form
      • Audio Recording Field
      • Custom API Phone Number Validation for Your WordPress Form
      • Updating WordPress user meta data after login
      • Automatically redirecting to next step after displaying text or a progress bar
      • Dropdown with groups (categories)
      • Prevent form submission based on entered field values
      • Track form submissions with GTM (Google Tag Manager)
      • Tracking Multi-part steps with Google Analytics
      • Tracking Multi-part steps with GTM data layer (dataLayer.push)
      • Track form submissions with third party
      • Compare input field value with database value
      • Insert form data into a custom database table
      • Delete database row after contact entry is deleted in WordPress
      • Limited date availability (slots) for your WordPress booking form
      • Send submitted form data to another site
      • Exclude empty fields from emails
      • Execute custom JS when a column becomes conditionally visible
      • Toolset Plugin: Update comma separated string to Array for meta data saved via Front-end Posting
      • Toolset Plugin: Update file ID to file URL for meta data saved via Front-end Posting
      • Delete uploaded files after email has been send
      • Increase Cookie lifetime for client data such as [Form Progression]
      • Altering cookie secure and httponly parameters
      • Define fake cronjob to clear old client data if cronjob is disabled on your server
      • Define page language attribute based on page ID or URL
      • Define custom headers when doing a POST request
      • Change checkbox/radio layout to vertical on mobile devices
      • Show remaining available form submission allowed
      • Global fields / elements
      • Trim values of fields
      • Re-sending E-mails after editing entries via Listings for WordPress
      • Combine multiple field values into one column on Contact Entries page
      • Altering the attachments for E-mails via PHP code for WordPress
      • Generate dynamic columns with dates based on user selected date from Datepicker element
      • Hide `eye` icon from Listings row based on user role
      • Variable product checkout based on variation SKU
    • Data storage
    • BETA version
  • Changelog
  • Support
Powered by GitBook
On this page
  1. Features
  2. Advanced

WordPress form with Google sheets dropdown

How to setup a WordPress form that has a dropdown with items retrieved from a Google (drive) sheets file.

PreviousAdvancedNextCustom registration form for WordPress

Last updated 12 months ago

This feature is currently only available in the .

This guide will walk you through the steps to setup a for your form that implements Google Sheets service to retrieve the rows from your sheet as the dropdown items. Note that this can also be used for element, element and any other elements that implement the "Retrieve method" setting.

First open the Google Cloud Console and if you haven't already.

Enter the project name, billing account and company (optional) and click CREATE.

Enable the for your project. Direct link to Google Sheets API:

Confirm you are still on the correct project and enable the API by clicking ENABLE as shown below.

Next we will want to create our credentials so that we can communicate with Google Sheets API. Click on the CREDENTIALS tab, then click + CREATE CREDENTIALS and choose Service account as shown below.

Enter the Service account name, ID and description. For our demo we will name it superforms. Click DONE.

Important: Make sure to copy the service account email address as shown in the picture below. You will need it later on to share the Google Sheet document.

Now go ahead and click on the account you just created, in our case superforms@xxxxxx:

Create a new key for this account. Click on the KEYS tab and click ADD KEY. Choose Create new key from the dropdown to create a new one as shown below.

Choose JSON as the key type and click CREATE as shown below.

Change the Range if needed, but by default this will be Sheet1 which will read all the rows from Sheet1.

Now copy the sheet ID. You can find your sheet ID from the URL in your browser as shown below.

Paste this ID under Google sheet ID for your Dropdown element on your WordPress form, and click Update Element to save the settings for the Dropdown element.

If setup correctly your Dropdown settings should look something like this:

Now Save the form and test if the changes made to the Google Sheet are reflected on the form Dropdown element.

You should now be able to manipulate the dropdown items by editing the Google spreadsheet.

A .json file should now be downloaded. Open the file and copy the contents to your clipboard. Navigate to your form and add or edit your . Set the Retrieve method to Google sheets and paste the contents of the json file under Google API credentials.json.

The last step is to (if you haven't already). A sheet can be set to public or private. If you choose for a private sheet, you will require to add (share) the sheet with the service account created so that it has permissions to view the contents. To do this click the "Share" button or go to File > Share. Here you can paste the service account address:

Dropdown element
create a Google Sheet
BETA version
Dropdown element
Keyword
Autosuggest
Create a New Project
Google Sheets API
https://console.cloud.google.com/apis/library/sheets.googleapis.com
Enable Google Sheets API.
Creating a new Service account credential.
Entering service account details.
Copy the service account email address
Select the Service Account to create a key.
Creating a new key for your service account.
Create private key for service account as type JSON.
Share google sheet document with service account.
Sharing the google sheet and giving "Viewer" permissions only.
Find the google sheet ID from the URL.
Define the google sheet ID for the Dropdown element.
Dropdown configured to retrieve Google Sheets rows as items.
Enable Google Sheets API.
Creating a new Service account credential.
Entering service account details.
Copy the service account email address
Select the Service Account to create a key.
Creating a new key for your service account.
Create private key for service account as type JSON.
Share google sheet document with service account.
Sharing the google sheet and giving "Viewer" permissions only.
Find the google sheet ID from the URL.
Define the google sheet ID for the Dropdown element.
Dropdown configured to retrieve Google Sheets rows as items.