Forums

Export data from checkbox group to Gsheet

Němec 06 Feb, 2015
Hi,
I would like to export data from checkbox group into Google sheet.

The problem is in the checkbox group field name:
Field Name tag includes brackets - product[]
Google sheet tag includes brackets - Gsheet[]

So in the final version, it should look something like this Gsheet[product[]]. But this - of course - doesn't work. Any idea how to do it? Thanks.
Max_admin 06 Feb, 2015
1 Likes
Hi Nemec,

It should be:
Gsheet[product][]


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Němec 06 Feb, 2015
Unfortunately, it still does not work. 😟
Max_admin 06 Feb, 2015
You will need a "Handle arrays" action before the "sheet save" action, also you will need the handle arrays update, please send me a message using the "Contact us" page to get the latest file!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Max_admin 07 Feb, 2015
The image doesn't load!

Do you have the handle array action before the sheet save action ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Němec 07 Feb, 2015
Yes, I have.

http://files.lanete.cz/form.jpg
Němec 07 Feb, 2015
Data from Debugger:

Data Array:
Array
(
    [option] => com_chronoforms5
    [chronoform] => Test
    [event] => submit
    [GSheet] => Array
        (
            [options] => Array
                (
                    [0] => Option1
                    [1] => Option2
                )

            [name] => John
        )

    [button3] => Submit
)


Errors:
Array
(
)
Max_admin 09 Feb, 2015
The "Handle arrays" action should be right above the "Sheet save" action, in the same event!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Němec 09 Feb, 2015
I am sorry It was old screenshot. I tried to add it into onSubmit event (before Gsheet event and also on the top). I also tried into onLoad event (on the top). But I always got only "Array" value.

http://files.lanete.cz/form2.jpg
GreyHead 09 Feb, 2015
Answer
Hi Němec,

I know that Max changed the Handle Arrays code in the latest release to resolve some problems with CC. I think that may be affecting your code here. Please try adding a Custom Code action and drag it up before the GSheet Save:
<?php
$form->data['GSheet']['options'] = implode(', ', $form->data['GSheet']['options']);
?>


Bob

[[>> later: updated to correct GSheet <<]]
Němec 09 Feb, 2015
Hi Bob,
It works! Thanks. Thanks. Thank you very much!

I had to change only "Gsheet to GSheet" in your code. It's sensitive to uppercase and lowercase letters.

Regards,

Němec
Max_admin 09 Feb, 2015
Ok, this is now confirmed a bug in the "handle arrays" action, the inner array should have been handled automatically!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.