Array ( [DB Save] => Array ( [Queries] => Array ( [0] => INSERT INTO `_Sample1` (`text1`, `button2`, `user_id`, `created`) values ('mytext', 'Submit', '0', '2014-08-18 14:30:48'); ) ) ) [1] => Array ( [Google Spreadsheet Save] => Array ( [Authentictaion] => Success [SheetURL] => Found! [Columns] => Array ( [0] => text1 ) [AddResult] => Blank rows cannot be written; use delete instead. ) ))"> Google spreadsheet save - Forums

Forums

Google spreadsheet save

sirnelson 18 Aug, 2014
Hi,

I'm trying to save the form data to a google spreadsheet, but what ever I do I always get the same error: "Blank rows cannot be written; use delete instead."
I try with all fields, some fields and just one file int the array and clumns on the google spreadsheet but with no success.

I've tried with the DBsave and it works well.

Any idea on this?

The debug log is below:

Array
(
    [3] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `_Sample1` (`text1`, `button2`, `user_id`, `created`) values ('mytext', 'Submit', '0', '2014-08-18 14:30:48');
                        )

                )

        )

    [1] => Array
        (
            [Google Spreadsheet Save] => Array
                (
                    [Authentictaion] => Success
                    [SheetURL] => Found!
                    [Columns] => Array
                        (
                            [0] => text1
                        )

                    [AddResult] => Blank rows cannot be written; use delete instead.
                )

        )

)
Max_admin 19 Aug, 2014
Hi sirnelson,

How many fields do you have in your form ? what are their names ? what are the names of the columns in your sheet on Google ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
sirnelson 19 Aug, 2014
Hi Max,

The form has only 1 field "text1" and one submit button "button2", and the column in the google docs file has the same name as the text1. I tried already inserting a column for the button2, but i got the same error. I also tried removing all rows of the google docs and it didn't work.

I can't see what is missing here. Any idea?
If you need more information, just ask.

Thanks a lot for helping me.

DEBUGGER LOG:
Data Array
Array
(
    [option] => com_chronoforms5
    [chronoform] => Sample1
    [event] => submit
    [text1] => qqq
    [button2] => Submit
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
    [1] => Array
        (
            [Google Spreadsheet Save] => Array
                (
                    [Authentictaion] => Success
                    [SheetURL] => Found!
                    [Columns] => Array
                        (
                            [0] => text1
                            [1] => button2
                        )

                    [AddResult] => Blank rows cannot be written; use delete instead.
                )

        )

)
Max_admin 19 Aug, 2014
I think that your columns are named "A" and "B", and so you must either rename them in your sheet OR change the form fields names to include at least one of those!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
sirnelson 19 Aug, 2014
Hi;

The columns are in fact A and B, but you can't change that. When editing settings under Data Path you you the first row for that. Please see attach.

"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."

Thanks agan,
Nelson
Max_admin 19 Aug, 2014
Answer
Ok, sorry, I got confused!

But the data path should be used if your fields values are under a specific data key in the data array, which is usually the case when loading the data from database, but in your case please leave it empty!

Let me know how it works!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
sirnelson 20 Aug, 2014
Hi Max,

That way works, I've tried it before but I guess the order of the fields in the google docs where not in the correct position.

Thanks a lot.
Nelson
jbomb 16 Sep, 2014
I thought I got mine right. I have all the fields right, I even exported the data then imported it into the google spreadsheet. Then I added this into the data path
["id","created","bill2add","distship2add","distname","distemail","distphone","po","model","logo","bagquantity","redemption"]

These are the top fields. But it doesn't seem to save the data.
sirnelson 16 Sep, 2014
Hi jbomb,

What worked for me was:
1- Living the "data path" empty
2- to the data imported to google spreadsheet i had to remove the columns: id, uniq_id, user_id, created, modified. I have there only the fields that the user fills.
This topic is locked and no more replies can be posted.