bigbonthabeat — 2011-03-09T14:44:19-05:00 — #1
I am extremely confused about how to make my contact form work. I don't know how make it actually send an email to my email address.
I downloaded the form from here:
Demos - jFormer
I uploaded it to my server:
Bryson Price jFormer
Can anyone please help me make a PHP document that will work with this form? I am extremely confused about how all of this works : /
colinmcc — 2011-03-10T00:32:19-05:00 — #2
A quick look shows that the form handler is jformer.php which is part of the download package, so I expect that somewhere in that file you have to add your email address then the form's contents will be mailed to you.
The documentation is rudimentary so I'd email the authors using their contact page.
wolf_22 — 2011-03-10T15:02:03-05:00 — #3
bigbonthabeat, I just looked at that thing... Maybe someone around here with more experience can give you a better assessment, but if I were you, I'd scrap that.
To me, it seems way over bloated, makes extensive use of expressions, and seems overall unfriendly for both the one using and the one maintaining. Again, this is my opinion and it may be flawed!
What exactly are you in need of here? Just a simple contact form or something more extensive? What was it that made you use this "jFormer"?
bigbonthabeat — 2011-03-10T23:23:04-05:00 — #4
I wanted a form that doesn't look so 'elementary'. After I made this post, I went on a mission to at least learn the basics of forms and PHP, and I did. I built this one (click on the link below, and click on the 'gmail' logo. A form will pop out)
The problem with this one is that it looks too basic. I want something a little fancier to let people know I'm legit. I liked the "jFormer" form because it highlights the fields when you click in them. Also, it fits the theme of my website ('clean and fresh, but professional').
If you have suggestions for other forms, I am completely open to changes : )
wolf_22 — 2011-03-11T00:19:31-05:00 — #5
Okay, so you need a basic contact form with some styling and minimalist UI functionality, right?
bigbonthabeat — 2011-03-11T01:22:34-05:00 — #6
Yes, I would say it needs to be a very simple form, but with some cool features like highlighting when you click the field. All I need on the form is "NAME, EMAIL, and MESSAGE."
I would say a 2 or 3 lol. I just started a month ago
wolf_22 — 2011-03-11T14:14:58-05:00 — #7
Sorry for not replying sooner (at work at the moment ).
I have a basic contact form that I'm currently working on. I'll try to send it to you later this evening to check out and maybe learn something from, but in the meantime, I thought I would try to encourage you to use a tutorial I found awhile ago so that you can begin teaching yourself this stuff. Trust me, it's way better than posting on forums all the time.
That said, I stumbled across this page earlier this morning. It looked like an okay tutorial but even better, it provides a sub tutorial on creating your own localhost e-mail server to test with (which is invaluable).
Until I get done with my contact form, you could go ahead and try to work on that tutorial above (unless you find something better between now and whenever, that is).
If you do work on the tutorial, keep the following in mind:
- You need to go download and install the "ArGoSoft Mail Server" (it's an okay program that's easy to install and remove later on should you choose to. No hardcore server setup experience required and no strings attached.)
- After that, go download and install Mozilla Thunderbird. Don't worry, like above, this one's easy to install and remove, too.
- After these are both installed, create a new domain and user in the ArGoSoft app. Name the domain "localhost" and give your user a name of whatever you want (password is optional). Once this has been done, turn the e-mail server on by pressing the tiny "green arrow" at the upper-left portion of the window. (Tools / Account Settings). Make sure you use whatever name you used with the server and your e-mail address will be <your name>@localhost. I believe that's it with the e-mail setup stuff.
- Now, assuming you have WAMP (or something equivalent) installed on your computer to test out your actual PHP applications, throw the code at the bottom of this page into a PHP file to test out your e-mail server. (Keep in mind that once you load up the page, you won't see anything. Instead of looking for something to happen, you'll have to instead go back into Mozilla Thunderbird and have it "Get Mail" instead.) If everything's been setup correctly, you should receive a simple message in your inbox. If not, go back and repeat a few steps... Or, ask for more help.
- Assuming everything worked okay, go create a simple PHP index page that has some simple markup for your form. The actual form markup element allows for 2 notable attributes: "action" and "method". With action, you'll provide the name of the file you want to submit your form values to, in our case, just use something like "processor.php". For the method attribute value, use "post" (the twin brother of this is "get", which allows you to submit values through the URL address bar, otherwise known as "query strings"--we don't really want this.)
- Don't worry about styling at this point. Worry more about getting your values submitted to that processor page. To ensure this happens, you'll need some inputs to submit values from (i.e. - first name input, last name input, website input, and a message text area) and once the user (you) fills these in, you'll need a submit input button to make it all be submitted to that processor.php page. So do some reading on simple forms using PHP for data handling and don't forget about that mail code I mentioned below.
// The message
$message = "Blah, blah, and more blah... Better than Hello World!";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
mail('Wolf_22@localhost', 'My Subject', $message);
(Again, just load this to-be file into your browser. That's all.)
I'll try to be back online later.
bigbonthabeat — 2011-03-11T22:44:06-05:00 — #8
Thank you for taking the time to post all this info. I will not be able to follow the steps until later tomorrow because I will be busy, but I just want to let you know that I REALLY appreciate you taking the time to help me with this.
I'm definitely going to check this out and study it. Do you think we could keep in touch through email instead of posting on this forum? It's easier for me to keep up with because my email goes directly to my phone. Or if you don't want to post you email, send me an email by clicking on the "GMAIL" logo on the website below:
once again, I GREATLY appreciate the help
wolf_22 — 2011-03-11T23:07:44-05:00 — #9
Sure. I'll IM ya on here with my info.
ethan_27 — 2011-03-12T09:10:14-05:00 — #10
I just checked out the page you recommended in a previous post, its really great.
I know there is alot to more to add but to get the basics it is so clear!