Page 1 of 1

Form to .CSV file exporter

Posted: Mon May 07, 2007 8:06 pm
by savagekabbage
Hey guys, this is my first attempt at a module.  It's still under construction, and doesn't quite follow all of the CMSMS module conventions YET. 

However, if you are looking for something to take all of your entered form information and export it to a .CSV file, this might help you.  You have to have at least 1 form setup and have records being saved to the database in order to use this.  This module will also allow you to view entered form information and sort the results by any column of information you want.  (Still working on adding a search)

Right now the code seems to be extremely inefficient.  If there's any interest in this module I might try to clean it up some.

You can download it here:
http://www.imageworksstudio.com/uploads ... wer-02.zip

Re: Form to .CSV file exporter

Posted: Wed May 09, 2007 2:42 am
by Greg
I would find such a module very useful. Will try out your current version soon. Thanks for sharing.

Re: Form to .CSV file exporter

Posted: Wed May 09, 2007 5:22 am
by cyberman
Thank you very much for your commitment.

Maybe you wanna open a project here  ;)

http://dev.cmsmadesimple.org/
savagekabbage wrote: Right now the code seems to be extremely inefficient.  If there's any interest in this module I might try to clean it up some.
Please make a look at skeleton module, which helps to create a module.

Found this in formviewer.module.php

Code: Select all

$cgextensions = cms_join_path($gCms->config['root_path'],'modules','CGExtensions','CGExtensions.module.php');
if( !is_readable( $cgextensions ) )
{
  echo '<h1><font color="red">ERROR: The CGExtensions module could not be found.</font></h1>';
  return;
}
require_once(cms_join_path($gCms->config['root_path'],'modules',
			   'CGExtensions','CGExtensions.module.php'));
There's a easier solution like this

Code: Select all

	function GetDependencies()
	{
		return array('CGExtensions'=>'1.0.2');
	}
It checks if CGExtensions module is installed. If not you cannot install formviewer ;) and you got a missing message in modules view (admin panel).

Re: Form to .CSV file exporter

Posted: Wed May 09, 2007 1:40 pm
by savagekabbage
cyberman wrote: Thank you very much for your commitment.

Maybe you wanna open a project here  ;)

http://dev.cmsmadesimple.org/
I might consider it, I just haven't yet, because my module is very similar to the Form Browser and inefficient.
cyberman wrote: There's a easier solution like this

Code: Select all

	function GetDependencies()
	{
		return array('CGExtensions'=>'1.0.2');
	}
It checks if CGExtensions module is installed. If not you cannot install formviewer ;) and you got a missing message in modules view (admin panel).
Ah, I see.  I think I just copied that part from the Questions module.  Honestly, I don't even know if the module needs CGExtensions ;-)