Forums

Google spreadsheet save: save to multiple spreadsheets?

oloccina 17 Sep, 2016
Hello,
I was wondering if with this action it would be possible to save to more than one google spreadsheet

eg.
I have some fields in my form that I want to save to speradsheet 1
some others that I want to be saved to spreadsheet 2
and finally some that I want to be saved to both spreadsheets

I must admit I haven't really delved into the action parameters yet, I have just quickly read the how-to tutorial, also I have no programming skills so I am asking if it's possible to do using the default action parameters

Thank you
GreyHead 17 Sep, 2016
Hi oloccina,

Yes you could do that - use multiple copies of the action and make sure that you have distinct $form->data sub-arrays for each sheet.

Bob
oloccina 17 Sep, 2016
Sorry,
but the tutorial is not clear to me at this point

Second create you form and use Array Names for the inputs that you need to save. I used the suggested 'GSheet' model ID and so my inputs are called GSheet[text1], GSheet[text2] and GSheet[text3].



in the above example where does GSheet[text1] go?
field name? field ID? elsewhere?
oloccina 17 Sep, 2016
Found it!
I should have read more carefully...

Note: in the Chronoforms form, name your fields as “GSheet[your field name from your Google Spreadsheet]”. I populated both the name and the ID field with this value – I couldn’t be bothered finding out which field needs to be populated as such.

GreyHead 17 Sep, 2016
1 Likes
Hi oloccina,

Where it says name it means name - using [] in IDs is invalid HTML and may cause you problems with any JavaSCript that tries to reference the elements. Use - for example - GSheet_text3 for the ID.

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