ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Write on Google spreadsheet

damconsulting 05 Jul, 2016
Dears,
i need someone who can correctly configure chronoforms to write datas on a Google spreadsheet.
I follow some tutorial found on this site, but without success.
Can anyone help me?
I can pay for it.
Thank you.
DAM
GreyHead 06 Jul, 2016
Hi DAM,

What exactly is the problem you are seeing? Have you checked the FAQ that Prof Calculus linked to?

Bob
damconsulting 08 Jul, 2016
I followed that tutorial but when I click on submit button I obtain an error:
401 - Error refreshing the OAuth2 token, message: '{ "error" : "invalid_client", "error_description" : "The OAuth client was invalid." }'

I checked it twice and made cut/paste from Google console.
Any idea?
Thank you.
DAM
damconsulting 09 Jul, 2016
Followed.

New error:
0 - Could not create storage directory: /tmp/Google_Client/f7

...:-(
GreyHead 09 Jul, 2016
Hi DAM,

Does the folder exist? And is it writable by the Joomla! server user?

Bob
damconsulting 10 Jul, 2016
The folder did not exist; so I created it and I assigned 777 permission.
But it still doesn't work...
Always: 0 - Could not create storage directory: /tmp/Google_Client/f7
GreyHead 10 Jul, 2016
Hi DAM,

Please check with your web-host. If you are on a shared server it may not be possible to write to that folder. Please see this StackOverFlow answer for some suggestions.

Bob
damconsulting 16 Jul, 2016
Well, I changed server and now it works. Thank you.

I've a little problem: my form has some "Text Box" fields that I named:
GSheet[field1]
GSheet[field2]
...
and i insert this value in Filed Name and in Field ID.

I need to generate also an email with datas, but when I insert this field {GSheet[field1]} in email html template, i receive a blank message.

Any idea?
Thank you.
GreyHead 16 Jul, 2016
Hi damconsulting,

In the email template please use {GSheet.field1}

Bob
damconsulting 16 Jul, 2016
It works fine, thank you.

Another little problem...😲

In my form, I collect date and time of submission with a php script which fills 'text11' field.
<?php
$form->data['text11'] = date('d-m-Y H:i:s');
?>
Can I pass it to Google spreadsheet? I try to change text11 with GSheet[text11] but it doesn't work.

Last question: i use an incremental identification of submission, using {id} value. It works fine when i send this information by email but... can i pass this value also to Google spreadsheet?

Thank you very much.
DAM
GreyHead 16 Jul, 2016
Hi damconsulting,

Please try
<?php
$form->data['Gsheet']['text11'] = date('d-m-Y H:i:s');
?>

Where are you getting the incremental id from? You should be able to save it if you add the value to $form->data['Gsheet']['id']

Bob
damconsulting 16 Jul, 2016
Wow, it works fine.
[attachment=0]array3.jpg[/attachment]

ID is the position on database rows; it's the only way i know to have unique incremental number.
Is there any php code to generate unique incremental number?

Thank you.
GreyHead 16 Jul, 2016
Hi damconsulting,

If you want a serial number then using the record id from a database table is probably the best way. If you want a unique identifier that is random so can't be easily guessed then I have a custom action that will let you do that.

Bob
damconsulting 16 Jul, 2016
I need only an incremental serial number.
Any idea on how I can pass it to the array?
Thank you.
GreyHead 16 Jul, 2016
Hi Damconsulting,

Use a Custom Code action after the DB Save and before the GSheet Export action:
<?php
$form->data['Gsheet']['id'] = $form->data['id'];
?>
Bob
damconsulting 18 Jul, 2016
Hi Bob, i try the custom code but it seems not to work... 😟
I put the action between DB Save and before GShee actions but [id] array filed is still blank.
Thank you.
DAM
GreyHead 18 Jul, 2016
Hi DAM,

Sorry I missed the = sign :-( Code is now updated.

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

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com