Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Choosing Options Going Further

Iannish Posooa
Iannish Posooa
Courses Plus Student 2,392 Points

Is there a simple way that I can get this HTML form information emailed to me when the person hits <submit>?

  1. Basically I am designing my portfolio site and I want people to just send me a msg by entering a simple text field (name, email, enquiry). I'm not a fan of the "Mailto:" button as it sometimes launches client emails.

  2. I also wanted them to have the ability to attach a rating of my site as an optional part of the form using <radio> but this is not as important as "1".

Matt F.
Matt F.
9,518 Points

I generally use PHP mailer for this. You cannot do it with HTML only.

2 Answers

As mentioned above PHP is the common method of handling this and PHPMailer is quite popular for doing the job: https://github.com/PHPMailer/PHPMailer however this is largely dependent on your PHP skillset as it can be a bit overwhelming if you aren't experienced. With that said, have you considered a service like Wufoo? http://www.wufoo.com/land/3/

For your site I believe you'd qualify for the free account: http://www.wufoo.com/pricing/

You could use their Form Builder: http://www.wufoo.com/form-builder/ to create a form and basically drop it into your site and style it.

For the record I am not affiliated with Wufoo in any way, but I know that forms can be cumbersome, so if it works for you it may be worth considering!

My suggestion is to keep moving forward in your training. As you continue you will see the ways you cant use a form field on your website and make it submit. Other than that, you would need to use third party software to use an email form on your website.