Martin54 Posted January 23, 2018 Share Posted January 23, 2018 Hello I'm using one of w3 schools responsive templates to build my site. I've put in a contact form but I'm not sure if it's responding correctly? An e mail box does pop up but no name of sender or email address of sender, nor any message. I've attached screen shots, if anyone can confirm where I'm going wrong that would be much appreciated. Many Thanks Martin Link to comment Share on other sites More sharing options...
Ingolme Posted January 23, 2018 Share Posted January 23, 2018 The mailto protocol doesn't provide a way to set the "From" address. It lets you set the subject and body. In order to do that, you have to give the inputs the correct name attribute: <input name="subject"> for the subject, <input name="body"> for the body. If you want more sophisticated mail functionality you're going to have to work with server-side programming. Link to comment Share on other sites More sharing options...
Martin54 Posted January 23, 2018 Author Share Posted January 23, 2018 Hello Ingolme Thanks for getting back to me and sorry for the delay in replying. I'm very new to all this coding, so it takes a while to get my head around the language. I'll take a look at your suggestion tomorrow and get back to you. Link to comment Share on other sites More sharing options...
Martin54 Posted January 24, 2018 Author Share Posted January 24, 2018 Hello Ingolme I've tried your suggestion but unsurprisingly it doesn't work, which is more likely, me not putting it in the correct place? Are you able to be more precise on where it actually goes, are you able to mark my screen shot? It seems slightly surprising, if w3 schools are offering templates with contact forms already in place, that that information isn't in place or maybe it is but my inexperience fails to see it, doh! Thanks for any further help. Link to comment Share on other sites More sharing options...
dsonesuk Posted January 24, 2018 Share Posted January 24, 2018 You don't add subject as input, but as a querystring mailto:someone@example.com?subject=somthing%20to%20do%20with%20mailto&body=what%20the%20hell" in form action. Link to comment Share on other sites More sharing options...
Ingolme Posted January 24, 2018 Share Posted January 24, 2018 If the form's method is GET and the input matches the correct query string parameter then a form can be used because the form generates the query string. Link to comment Share on other sites More sharing options...
Martin54 Posted January 24, 2018 Author Share Posted January 24, 2018 Hello dsonesuk and Ingolme Thanks for your replies and feedback, much appreciated. I'll get onto it tomorrow and let you know how I get on. Thanks Martin Link to comment Share on other sites More sharing options...
Martin54 Posted January 25, 2018 Author Share Posted January 25, 2018 Just to say the issue is sorted. Many Thanks to you both. Martin Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now