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
Ian Kelly
851 PointsContact form using Ajax
I added an contact form that uses ajax to my site. I got the code from a Treehouse blog post by Matt West from March, 2014. The code is here: https://github.com/ickelly/contact_form.
Overall, the form works well, but I'm having two issues that I can't resolve. The first seems to be minor. It is that after the mail is sent by mailer.php, I'm getting an error message from line "http_response_code(200)" saying that there is an unidentified function. I got around this by just commenting out the http_response_code lines, but I don't know if there is something I need to do to make it function properly.
The other issue is a UX issue. After the mail is sent, and the success message appears, red borders appear around all fields in the form. This doesn't appear to be handled by CSS, so it must be in jquery. I think the red borders are supposed to indicate bad data, but I don't want them to appear when the user had been successful in sending a message. Any help with this would be greatly appreciated.
Thanks, Ian.
Dylan Shine
17,565 PointsDylan Shine
17,565 PointsCould we see your code...?