Download the PHP package refineddigital/cms-form-builder-google-sheets without Composer

On this page you can find all versions of the php package refineddigital/cms-form-builder-google-sheets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cms-form-builder-google-sheets

Form Builder — Google Sheets

A Google Sheets integration for RefinedCMS Form Builder. On submit, a form's selected field values are appended as a new row to a Google Sheet. You pick which fields go to the sheet and in what column order from the form's Integrations panel; the normal submission email still sends unless you turn it off there.

Requires refineddigital/cms-form-builder and google/apiclient.

Install

The install command publishes the config (config/google-sheets.php) and appends these keys to your .env (only if missing — it won't overwrite existing values):

Variable What it is
GOOGLE_SHEETS_ID The spreadsheet ID — the long string in the sheet URL between /d/ and /edit.
GOOGLE_API_KEY A Google API key (developer key).
GOOGLE_AUTH_CONFIG Filename of the service-account JSON, relative to storage/app/.

Google setup

  1. In the Google Cloud Console, enable the Google Sheets API.
  2. Create a service account, download its JSON key, and place it in storage/app/ (e.g. storage/app/sheets-service-account.json). Set GOOGLE_AUTH_CONFIG to just the filename.
  3. Share the target spreadsheet with the service account's email address ([email protected]) as an Editor. Without this the write will fail.
  4. Add a header row to the sheet — the integration appends below existing content, so an empty sheet with no header row has nothing to anchor to and the write is skipped.

Connecting a form

Once the package is installed it appears automatically in every form's Integrations panel — there's nothing to wire up per-class.

In the CMS admin, edit a form and open the Integrations tab:

  1. Toggle Google Sheets on.
  2. Click Configure to open the settings modal. It has two tabs:
    • Fields — every form field, plus a built-in Date / Time column. Toggle each on/off and drag to set the column order in the sheet. The Date column is a synthetic column (not a form field) and can be dragged anywhere in the order, the same as a real field.
    • Config — the Send email toggle (leave on to still send the normal notification; turn off to write to the sheet only).

That's it — on submit, the enabled columns are appended as a row to the sheet in the order you set. All Google credentials come from .env; only the column selection/order is per form.

Column ordering

Columns are written in the exact order shown on the Fields tab. Drag a row up or down to move that value left or right in the sheet; toggle a row off to omit it entirely. The Date / Time column is just another draggable row — put it first (the default) or anywhere else.

If a form has never been configured (the Configure modal was never saved), the integration falls back to legacy behaviour: every field with a Merge Field value, in field position order, with a leading UTC timestamp (controlled by the timestamp config flag).

Config

config/google-sheets.php:

How it works

The service provider registers the integration with the core FormBuilderIntegrationAggregate, which is what makes it show up in the panel. Process implements FormBuilderIntegrationInterface; when an enabled form is submitted, the core form-builder calls Process::process($request, $form, $settings), which:

  1. Reads $settings['config']['fields'] — the ordered list of columns saved from the Configure modal ([{key, enabled}]). Each key is either a form field name (field{id}) or the synthetic __date.
  2. Builds a single row from the enabled entries, in order: __date becomes a UTC Y-m-d H:i:s timestamp, every other key reads $request->get($key). Array values (e.g. multi-checkbox) are joined with ,. Everything is UTF-8 encoded.
  3. If no columns are configured, falls back to FormsRepository::formatWithMergeFields() (merge-field'd fields in position order, optional leading timestamp).
  4. Appends the row to the sheet via Classes\Google::put(), which finds the next empty row and writes a RAW value range.

The integration does not send email — notifications are the form's own responsibility (controlled by the Send email toggle in the panel).

Sheet write errors are caught and reported (via report()), never surfaced to the visitor — a failed sync will not block a form submission or the email. Returning a failure result (or throwing) would abort the whole submission; we deliberately don't, so Google being down never costs you a lead.


All versions of cms-form-builder-google-sheets with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
refineddigital/cms Version ^1.36|dev-master
refineddigital/cms-form-builder Version ^1.13|dev-master
google/apiclient Version ^2.19
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package refineddigital/cms-form-builder-google-sheets contains the following files

Loading the files please wait ...