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
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.
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).
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
Thanks a lot to you all, I have now a better idea about where to begin.