Jul 05, 2009, 09:09 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  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1]   Go Down
  Print  
Author Topic: Can I use eForm to post to an external page?  (Read 478 times)
0 Members and 1 Guest are viewing this topic.
killorbytes
Member
**
Posts: 64


« on: Dec 11, 2008, 12:03 PM »

I'm redoing a site right now and I have rebuilt the contact form in eForm. The issue is that the old form submits to an aspx file that dumps the contents into a SQL dB. Can I use eForm to submit to that page? OR do I need to just do it the old fashioned way?
Logged
dev_cw
Testers
*
Posts: 4,025



WWW
« Reply #1 on: Dec 11, 2008, 01:10 PM »

You will need to use an eForm event to send the data to the location in question. Look at the eform2db snippet (or rather method since it is not really a snippet). This points to a mysql database using the modx db api, but you could use custom php to send it to the aspx page.
http://modxcms.com/forums/index.php/topic,8111.0.html
Logged

Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

Something is happening here, but you don't know what it is.
Do you, Mr. Jones?  -  [bob dylan]
killorbytes
Member
**
Posts: 64


« Reply #2 on: Dec 11, 2008, 04:08 PM »

Hmmm, this looks way more complicated than I need. The host already has a script developed that has been in use and works, I would rather just use eForm's validation and setup, but just target the host's existing script allowing eForm to do the redirecting after post, etc. Would this even work?
Logged
TobyL
Moderator
*
Posts: 1,006



« Reply #3 on: Dec 11, 2008, 04:44 PM »

Hmmm, this looks way more complicated than I need. The host already has a script developed that has been in use and works, I would rather just use eForm's validation and setup, but just target the host's existing script allowing eForm to do the redirecting after post, etc. Would this even work?

Redirecting to another page after eForm has finished validating would means you loose the $_POST values. They don't propagate.
Logged

ZAP
Testers
*
Posts: 1,583



« Reply #4 on: Dec 11, 2008, 06:11 PM »

Hmmm, this looks way more complicated than I need. The host already has a script developed that has been in use and works, I would rather just use eForm's validation and setup, but just target the host's existing script allowing eForm to do the redirecting after post, etc. Would this even work?
It sounds like you should just use the original form and script if you don't want to insert the info into the database yourself. If you're going to redirect to that form anyway, you may as well do it from the beginning. You could display it in an iframe or modal so that people aren't redirected away from your current site.

You can use eform2db to insert the data into the database yourself, however, and that works perfectly with eForm.
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!