Page 1 of 1
NooB - General form question
Posted: Wed Apr 05, 2006 8:59 am
by marcl
Hi,
Can anybody please provide pointers on how to implement forms + the processing in CMSMS.
I guess, for the form itself, the step to take *could* be:
1) create a tag that sets up the form fields
2) put the tag into a content page, pass action parameter that points to the script that handles the form
But how should I make the processing CGI script in CMSMS speak. A tag as well ? A module ?
Thanks,
Marc
Re: NooB - General form question
Posted: Wed Apr 05, 2006 10:06 am
by cyberman
Please look at
FeedbackForm module on CMSms ForgeĀ

...
Re: NooB - General form question
Posted: Wed Apr 05, 2006 12:19 pm
by marcl
thanks cyberman.
Thing is, I had already looked into that one. And it creates a form all right. But it only sends an email.
I would like to know how you set this up in a more generic way. Suppose that your code should not send an email but , you name it, make a database connection, do a query, a few calculations and return, as a result a summary table. Where should I put this code in CMSMS ? Should one make a module for that, tags, ....

Forgive my dummyness, but I am used to do some perl/CGI so I guess I did not make the proper switches in my brain to fit in the CMSMS-way

Cheers,
Marc
Re: NooB - General form question
Posted: Wed Apr 05, 2006 1:48 pm
by cyberman
marcl wrote:
But it only sends an email.
Found in Docu:
Write Results to Flat File. This takes the form results and writes them into a text file. You may select the name of the file, and its format. You can choose from "page" format, which looks like the emails that get sent by the other handlers, or you can choose a tab-delimited format useful for reading into Excel or similar programs. If you choose tab-delimited, you can opt to have the file start with a header row, which names the columns. These files are written to the "output" directory under the module's installation directory.
Hmm, there are newer modules (only on SVN) called formbuilder and formobjects - don't know if this can be the answer for your request. Haven't try it ... and I'm not a coder for realĀ

...
Re: NooB - General form question
Posted: Thu Apr 06, 2006 8:41 pm
by marcl
While browsing around in the forum, I found the solution here:
http://forum.cmsmadesimple.org/index.ph ... 668.0.html
Cheers,
Marc