Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:21:58 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155533 Posts in 21713 Topics by 7739 Members
Latest Member: audillino
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Form module database  (Read 559 times)
mikejd

Offline Offline

Posts: 160


« on: February 18, 2010, 03:42:02 PM »

It appears that the core form module will save submissions to the database. Is this into the main site database or somewhere else? How can the data be accessed?

cheers,
Mike
Logged
mikejd

Offline Offline

Posts: 160


« Reply #1 on: February 18, 2010, 04:45:22 PM »

OK, I have worked out how to access the information from the database using phpMysqlAdmin to export to a csv file. However, all the data is saved in one field. As it is address information it would be more usable saved into separate fields for each input field. Presumably this would take some recoding of the module. I already have an email form script which will give me what I want so the question now is - how do I set up a form using my own script? Can I just change the form code so that the 'action' attribute points to my script?

ie in row 139 of view.php, change

Code:
action="<?php echo htmlspecialchars(strip_tags($_SERVER['PHP_SELF'])); ?>#wb_<?PHP echo $section_id;?>"

to

Code:
action="myformscript.php"

Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #2 on: February 18, 2010, 05:18:40 PM »

1 create form
2 copy html

3 create page, paste html, change link

Would be one way
Another
Create droplet, change form link to what you want

Another
Try understanding how formdate is stored
and recode it maybe use php function nl2br to change newlines \n to br's <br> wich is easier for decode

And another... have you tried mpform?


Have fun,
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
mylesk42

Offline Offline

Posts: 120



WWW
« Reply #3 on: June 20, 2010, 10:49:02 PM »

Hello,
I'm having almost the same question.
Usually, I use my own HTML form with it's own .php, .js and css control files. But this time, I'd like to add each submitted form to be stored in the db with always my own files.
I saw that all the field were stored in the same field called 'Body'.

So : is there a way to use my own php, js and css ... files, submit th eform and store each field of the form in a separate column of the db ? (In fact, I'd like to use to csv export modul to have all the clients demand from on click, but it can possible only if each field is separated).

Thanks for your answer

Regards
Logged
mylesk42

Offline Offline

Posts: 120



WWW
« Reply #4 on: June 22, 2010, 10:12:43 AM »

Hello,
Well, I've solved my problem. I've created a specific table to store my form infos and with csvexport behind, it's a breeze to export my table to a csv file.

Bye
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!