Jul 05, 2009, 09:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: use eForm to populate database?  (Read 908 times)
0 Members and 1 Guest are viewing this topic.
jbloggs2002
Member
**
Posts: 53


« on: Dec 19, 2008, 06:01 PM »

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.
Logged
BobRay
Coding Team
*
Posts: 3,177



WWW
« Reply #1 on: Dec 19, 2008, 06:16 PM »

This might help: http://modxcms.com/forums/index.php/topic,8111.0.html
Logged

MODx info for newbies: http://bobsguides.com/MODx.html
TobyL
Moderator
*
Posts: 1,006



« Reply #2 on: Dec 19, 2008, 06:25 PM »

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.
Logged

ZAP
Testers
*
Posts: 1,583



« Reply #3 on: Dec 19, 2008, 06:26 PM »

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).
Logged

"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  | bug reports  | info you should include with your post | commercial support options
jbloggs2002
Member
**
Posts: 53


« Reply #4 on: Dec 19, 2008, 08:09 PM »

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?
Logged
ZAP
Testers
*
Posts: 1,583



« Reply #5 on: Dec 19, 2008, 08:16 PM »

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.
Logged

"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  | bug reports  | info you should include with your post | commercial support options
jbloggs2002
Member
**
Posts: 53


« Reply #6 on: Dec 19, 2008, 08:40 PM »

Thanks for the clarification. I really appreciate all the help I've gotten in this community.
Logged
ZAP
Testers
*
Posts: 1,583



« Reply #7 on: Dec 19, 2008, 08:46 PM »

I really appreciate all the help I've gotten in this community.
Welcome to it!
Logged

"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  | bug reports  | info you should include with your post | commercial support options
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!