Spreadsheet from a form

fredfitaire 03 Oct, 2013
Hi all,

I have a little project to handle for which I'm still asking myself whether Chronoforms 4 is the right tool or not.
Let me sum up my specifications:
- a registered user fills a form with "textarea" fields, with some text
- when he submit the form, it automatically creates a spreadsheet with as much rows as textarea fields, in one line
- the spreadsheet is then displayed and can be accessed at any time from a link, menu or whatever
- if another user submit the same form, his fields are added to the same spreadsheet in the second line, etc ...
- ideally, each user would be able to edit his own datas directly in the spreadsheet
- the spreadsheet would be exportable as a XLS file

Is that realistic with Chronoforms 4 ?

I tried to create one form where I choose the "XLS Export"/"OnSubmit" action but I cannot configure it, especially the "Data path". Is there any documentation that explains what "$form->data array" means ? I searched through all the documentations but didn't find anything interesting.
Then, what is the proper action to automaticaly display the spreadsheet after having submitted ?

Thanks😉

NB: this kind of process can be done from Google Docs which is able to create a spreadsheet from a form, but unfortunately with only a low level of available customizations.
GreyHead 04 Oct, 2013
Hi fredfitaire,

The best answer I can give is 'Yes and No'; I don't have any doubt that you can do this with ChronoForms. The problem - as you've found - is in handling the interface with Excel. This is possible, but you'd have to find a library that can handle what you need and hand-code the saves.

It's fairly easy to construct CSV files that can be opened in Excel, quite another task to create files that can update an existing spreadsheet.

+++++

The $form->data array is an internal array used by ChronoForms to handle form data. It is available to all actions in an event so is a useful way to manage and pass data from one action to another.

When the event loads ChronoForms will get the current 'get' and 'post' data and add those to the $form->data array. Some ChronoForms actions will check the array and use values from it either in option boxes where you enter an array key (e.g. an input name), or in the 'curly-brackets' syntax of {input_name}.

You can add and edit data in the array in the same way as any other PHP array.

Bob
fredfitaire 04 Oct, 2013
Thank you Bob,
That confirms that my project is far from what I can develop !
I give up and will stay with Google Docs for the moment.
This topic is locked and no more replies can be posted.