Forums

Chronoform5 Google Spreadsheet Save

ingrid88 10 Jun, 2014
Hi there,

I added Chronoform5 to my Joomla site and we want to make sure the data is stored in a google spreadsheet. The "google spreadsheet save" setup block asks for 'Data path' with the explanation "The data array path under which the data to be saved, the data should be in array format and the array keys should match the worksheet 1st row columns names."

What is "the data array path under which the data to be saved". This language is vague and I'm not sure what to put here. Any help would be much obliged

cheers
Ingrid
GreyHead 11 Jun, 2014
Hi Ingrid,

The 'Data Path' refers to the ChronoForms $form->data array where the working data is kept. For example, if the data you want to export is in the $form->data['GSheet'] array then you'd put GSheet in the Data path box (which is the default value).

As a simple example lets say you have two columns in the spreadsheet : name and email. The Data structure would look like this:
$form->data['GSheet']
  [0] 'email' => 'some@email', 'name' => 'some_name'
  [1] 'email' => 'another@email', 'name' => 'another_name'
. . . 

Bob
phamtung32 20 Oct, 2014
Hi Bob,

I tried to use the google spreasheet save function but I stuck at this error:

(
            [Google Spreadsheet Save] => Array
                (
                    [Authentictaion] => Success
                    [SheetURL] => Found!
                    [Columns] => Array
                        (
                            [0] => t1
                            [1] => t2
                            [2] => t3
                            [3] => id
                            [4] => uniqid
                            [5] => userid
                            [6] => created
                            [7] => modified
                        )



fyi:
my google spreadsheet name is: test (has 1 worksheet named: sheet1)
My form name is: Tung
My datatable where the submission saved is: table_Tung1 (I use the DB save function is ok)

Please kindly help me🙂

Thank you,
Tung
GreyHead 20 Oct, 2014
Hi Tung,

Do you have the column names in the first row of the spreadsheet? Are then 0, 1, 2 . . . or something different?

Best wishes

Bob
phamtung32 21 Oct, 2014
Hi Bob,

Here is the first row columns in the google spreadsheet
t1 t2 t3 id uniq_id user_id created modified


fyi - I tried to mark it the same online form below:

Here is the form: http://kehoachtaichinhcanhan.vn/index.php/lienhe

Thanks,
Tung
phamtung32 21 Oct, 2014
I meaned: t1, t2, t3, id, uniq_id...
phamtung32 21 Oct, 2014
Hi Bob,

Now I can link the form with the google spreadsheet.

But I also need the created date of data showed in spreadsheet, it is not available now.

Please kindly help.

Thanks,
Tung
GreyHead 21 Oct, 2014
Hi Ingrid,

I used this code in a Custom Code action to add the current date to the 'bananas' column in my spreadsheet.
<?php
$form->data['GSheet']['bananas'] = date('Y-m-d');
?>

Bob
This topic is locked and no more replies can be posted.