Spreadsheet Calculated Fields Form Connector

Compatible with CFF: Professional Developer Platinum

Spreadsheet Calculated Fields Form Connector

The "Spreadsheet Calculated Fields Form Connector" allows implementing the calculations in Google Sheets documents and use the form for entering the data and displaying the results.


The "Spreadsheet Calculated Fields Form Connector" plugin enables the integration of Calculated Fields Forms with Google Sheets Documents. This integration facilitates the implementation of business logic and calculations in Google Sheets, utilizing well-known Excel formulas, and allows entering the user data and displaying the results within your website's form.

The "Spreadsheet Calculated Fields Form Connector" plugin offers several advantages. The implementation of calculations and business logic remains hidden from website visitors as they occur in Google Sheets. This integration enables harnessing the full potential of Google Sheets and Excel formulas.

"Spreadsheet Calculated Fields Form Connector" installation is similar to other plugins in WordPress. It requires downloading the zip file with the plugin's code to your computer (visiting the download link provided after purchasing) and following the steps below:

  1. Go to the Plugins section on your WordPress.
  2. Press the "Add New" button at the top of the section.
  3. Press the "Upload Plugin" button, and then select the zipped file downloaded previously.
  4. Finally, install and activate the plugin.

The plugin adds the "Calculated Fields Form > Spreadsheet Integration" menu option to register the plugin and enter the Google Sheets API keys. Furthermore, it activates the "Spreadsheet Integration" section in the forms' settings to integrate the form with a Google Sheets document.

To register the plugin, visit the "Calculated Fields Form > Spreadsheet Integration" menu option, enter the email address used to purchase the plugin in the "Enter the email address of buyer" attribute, and then press the "Register" button.

Registration Page
Plugin Registration.

To access Google Sheets documents from your website, you need to input a Google "Client ID" and "Client Secret", then click the "Generate Token" button. This process redirects you to Google Sheets to authorize your website to access the Google Sheets documents by granting necessary permissions.

To get the Google API keys you must follow the steps described below:

  1. Go to the Google Developer Console https://console.developers.google.com
  2. Create a new project. You can also select existing projects.
  3. Give a name to your project. Google Console will generate a unique project ID for it.
  4. Your project will appear on top of the left sidebar.
  5. Click on Library. You will see a list of Google APIs.
  6. Enable Google Sheets and Google Drive APIs.
  7. Click on the Credentials. Select Oauth Client id under Create credentials. Choose the radio button for the Web Application.
  8. Give the Name. Under Authorized JavaScript origins enter your domain URL: Enter the URL the plugin displays.
  9. In the Authorized redirect URIs add the link of the redirect URL: Enter the URL the plugin displays.
  10. Click on the Create button. You will get the client ID and client secret.

Upon configuring the global settings and obtaining the access token, we are ready to seamlessly integrate our forms with Google Sheets documents.

The "Spreadsheet Calculated Fields Form Connector" plugin introduces a dedicated section within the form settings called "Spreadsheet Integration". This feature allows users to establish a connection between the form and a Google Sheets document, as well as customize the mapping between the document cells and the fields within the form.

The settings area includes the attributes:

  • Enable spreadsheet integration?: Allows enabling/disabling the form-document connection.
  • Select spreadsheet document: The plugin lists all Google Sheets documents in your Google account for easy selection.

The form settings has two tabs, Calculation and Storing.

The calculation area configures fields for computation in Google Sheets and displays the results.

Calculation Area
Calculation Area.
  • Configure the event to trigger the read and write actions.
  • In the "Write fields' values to cells" section, you can input multiple pairs of field names and document cells to specify which field values should populate the corresponding document cells.
  • Within the "Read cells' values into fields" section, you have the option to input various pairs of document cells and field names. This allows you to define which form fields will be automatically populated with the values from the designated document cells.

Note that all users are collaborating on the same Google Sheets document. Due to the nature of the document, multiple entries are not retained as users are writing data into the same cells. The plugin ensures data integrity by locking the document and queuing other requests to prevent conflicts.

The storing area configures the fields to store in Google Sheets after submitting the form. It appends new rows in the Google Sheets document.

Storing Area
Storing Area.
  • In the "Append fields' values to cells" section, input pairs of field names and document cells to specify which values are stored in Google Sheets. Enter the initial cell in the column, such as A1, as the plugin automatically determines the appropriate row for data entry.

Operations Module.

The plugin includes a new operations module for reading or writing cells directly from the calculated fields equations:

Operations Module
Operations Module.

CFF_SPREADSHEET_GET_CELLS: Reads cells from the Google Sheets document selected in the form settings. It receives as parameters the cells to read and return a plain object whose properties are pairs of cell names and values.

CFF_SPREADSHEET_GET_CELLS( "A1", "B5")
Result: {"A1":12, "B5":"Text"}

CFF_SPREADSHEET_SET_CELLS: Writes cells in the Google Sheets document selected in the form settings. It receives as parameters a plain object with cell names and values.

CFF_SPREADSHEET_SET_CELLS( {"A1": 5, "B5": "Text"})

CFF_SPREADSHEET_GET_RANGE: Reads a cells range from the Google Sheets document selected in the form settings. It receives as parameters a text with the cells range to read, and returns an array of plain objects where each object represents a row, and their properties are the column names.

CFF_SPREADSHEET_GET_RANGE( "A1:B3")
Result: [{"A":5,"B5":12},{"A":8,"B5":21},{"A":44,"B5":65}]

29.99€

One time purchase

Details

Version 1.5.0
Last updated 2025/09/03

Compatibility

Php ≥ 8.1
CFF Professional All versions
CFF Developer All versions
CFF Platinum All versions
Tested up to WP 6.8