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!

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


Liam Roach
Liam Roach
16,787 Points

Contact Form Issue

I am creating a website for a local business and the idea is to have a box to type in and then you hit the send button and it sends it as an email to the declared email this partially works although after hitting send it opens up an email client and all the words have a + between them. The cancel button also does not delete the typed text. My code is below:


2 Answers

You haven't specified what your goal is? Do you want it to open in mail client. Or use PHP to send it to email address? Please elaborate.

Liam Roach
Liam Roach
16,787 Points

I want it to open in a mail client but it opens with the text being filled with + like this: Hi+I+am+enquiring... etc the cancel button also opens it in the mail client and I would just like this to clear the box.

I am not too sure about doing it that way. Why can't you use PHP and have it submit the form. Not all users even have a mail client installed on computer so how will they contact the business if it doesn't get sent my the server. If you really want to do it the mail client way i would ask on [HERE](www.stackoverflow.com) if you do post there though ensure your question is worded good and that you show some effort as they are picky lol.

Sorry couldn't assist more.