Topic: use eForm to populate database?  (Read 1488 times)

Pages: [1]   Go Down

#1: 19-Dec-2008, 06:01 PM

jbloggs2002
Posts: 68

I'm trying to convert an existing site to MODx, and it has several forms which are multi-page and end up populating a database, sending notification emails and passing some data to an external payment processor.
From my reading I've ascertained that eForm can (with work) handle multi-page forms, and it can certainly send emails, but can I use it for the other 2 functions - populating a MySQL database and passing the data on to another page as POST ?

Thanks.

#2: 19-Dec-2008, 06:16 PM

Coding Team

BobRay
Posts: 5,314

WWW
This might help: http://modxcms.com/forums/index.php/topic,8111.0.html
MODx info for newbies: http://bobsguides.com/MODx.html

#3: 19-Dec-2008, 06:25 PM

Moderator

TobyL
Posts: 1,024

See this article in the modx wiki or this eForm2DB discussion in the forums for the database part.

"passing the data on to another page as POST" will require you to dive in and script things yourself I'm afraid.

#4: 19-Dec-2008, 06:26 PM

Testers

ZAP
Posts: 1,619

You can certainly use eForm to save info to a database using eForm2db (which is just an eForm event function). And you can store data from one page in a session var or in a session table in the database and pull it out on the next page (which will probably be easier than trying to get POST vars to go from page-to-page and not be broken if people click Back). I always decide that it's less trouble to put multi-page forms on a single page with Javascript tabs between "pages" (I did actual multiple pages once and it was a pain).
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#5: 19-Dec-2008, 08:09 PM

jbloggs2002
Posts: 68

Thanks for the speedy responses. It sounds like I might be better off just throwing the forms & php I'm using on the existing site into chunks and inserting them. That should work, right? There's no reason javascript validation shouldn't work the same either, is there?

#6: 19-Dec-2008, 08:16 PM

Testers

ZAP
Posts: 1,619

Thanks for the speedy responses. It sounds like I might be better off just throwing the forms & php I'm using on the existing site into chunks and inserting them. That should work, right? There's no reason javascript validation shouldn't work the same either, is there?
You mean snippets (chunks can't contain PHP code), and yes they should work about the same as they do as standalone scripts.
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#7: 19-Dec-2008, 08:40 PM

jbloggs2002
Posts: 68

Thanks for the clarification. I really appreciate all the help I've gotten in this community.

#8: 19-Dec-2008, 08:46 PM

Testers

ZAP
Posts: 1,619

I really appreciate all the help I've gotten in this community.
Welcome to it!
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.