We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4639
    • 36 Posts
    Hi

    I need to add a simple contact form to my website but I want to do it without using the eForm snippet, I know that there’s no need to reinvent the wheel but I really want to code a solution of my own. I supose that a snippet is the way to go but I’m kind of confused about where to start.

    If anybody could give me some advise I would apreciate it very much, I’m good in PHP programming.

    Thanks in advance.

    Carlos
      • 27330
      • 884 Posts
      try the magic search box up there ^^^ "alternative to eform"
      it works wonderful sometimes wink
        • 33372
        • 1,611 Posts
        As long as you call your snippet uncached, it will work pretty much just like any other PHP code that you might write and run outside of MODx, so just code the contact form the way that you’re used to and try it out as a snippet. If you have problems, post your code here for help. If you’re familiar with PHP you shouldn’t have any major issues.
          "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
          • 7231
          • 4,205 Posts
          As Zap said just do it as you wold normally with PHP. In general a snippet will behave like regular php so if it works outside of modx it will work inside of modx (might need to make a few changes but generally it will work).
            [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]
            • 3749
            • 24,544 Posts
            Quote from: carlosma at Mar 28, 2008, 07:58 PM

            Hi

            I need to add a simple contact form to my website but I want to do it without using the eForm snippet, I know that there’s no need to reinvent the wheel but I really want to code a solution of my own. I supose that a snippet is the way to go but I’m kind of confused about where to start.

            If anybody could give me some advise I would apreciate it very much, I’m good in PHP programming.

            Thanks in advance.

            Carlos

            If you just want a simple contact form, the SPForm snippet is exactly that. It’s a lot simpler and less powerful than eForm. If you’re determined to roll your own, you could use the SPForm code as a starting point.

            Bob
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 4639
              • 36 Posts
              Thanks a lot to you all, I have now a better idea about where to begin.