We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15871
    • 105 Posts
    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?
      • 7231
      • 4,205 Posts
      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
        [font=Verdana]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]
        • 15871
        • 105 Posts
        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?
          • 30223
          • 1,010 Posts
          Quote from: killorbytes at 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?

          Redirecting to another page after eForm has finished validating would means you loose the $_POST values. They don’t propagate.
            • 33372
            • 1,611 Posts
            Quote from: killorbytes at 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?
            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.
              "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