Copy link to clipboard
Copied
The submit button is meant to be emailing the data in the form, but isn't doing anything at all. I am aware that the mailto action is unreliable, but I'm unable to use any server side code instead of it, and I don't know of any other ways to make it send an email.
Just a quick side-note, but is there a way to redirect the user after submitting the form without using server side code?
<form action="mailto:1sportsuk2016@gmail.com" enctype="text/plain" method="post" autocomplete="on">
<fieldset>
<legend style="color: #FFFFFF; font-size:22px;">Bookings Form: </legend>
<p>
<input id="fname" type="text" placeholder="First Name" name="First Name" required autocomplete > ...............
<label for="textarea">
<input id="email" type="email" placeholder="Email Address" name="email" required autocomplete>
<input id="lname" type="text" placeholder="Last Name" name="Last Name" required autocomplete>
A r e a : </label>
</p>
<p>
<textarea name="Feedback" id="Feedback" maxlength="250" placeholder="Please give us your feedback about our website and our facilities in 250 characters or less." cols="63"rows="3"></textarea>
</p>
<p> <span style="color: #FFFFFF">Please select your gender:<span style="color: #000000">.........</span></span> <span style="color: #FFFFFF">Male:
<input name="gender" type="radio" title="Male" value="Male">
<span style="color: #000000">.........</span>Female:
<input type="radio" name="gender" value="Female">
</span><br>
</p>
<p><input type="reset">
<input id="submit" type="submit" value="Submit">
</p>
</fieldset>
</form>
mailto links work by opening the computer's default email application (if one is installed) allowing the user to then send the info via that email client.
Without an installed client, nothing happens when you click Submit. Without additional scripting, the page will just sit in the background as the email client opens. There's no way to make the page go somewhere else when Submit is clicked, that actually has anything to do with whether the data has been submitted, without some kind of scripting.
...Copy link to clipboard
Copied
mailto links work by opening the computer's default email application (if one is installed) allowing the user to then send the info via that email client.
Without an installed client, nothing happens when you click Submit. Without additional scripting, the page will just sit in the background as the email client opens. There's no way to make the page go somewhere else when Submit is clicked, that actually has anything to do with whether the data has been submitted, without some kind of scripting.
You "could" fake it by putting a link on the button during the onclick event that simply goes to a different page while the email client opens, but it will go to that page no matter what, whether the email client opens or not or whether the data is actually sent or not.
If you don't have php, or some other server side language available on your server (sort of an oddity these days) there are services that you can link to that will do the same thing.
Copy link to clipboard
Copied
If you don't have an email client configured to open with those links nothing will happen. And no, there is no way to redirect someone without using a script to do so.
If you don't mind me asking, why are you unable to use server-side scripting?
Also, have you considered hosted solutions? If it is a small enough volume you may be able to squeeze into some free plans, but as you grow, hopefully your company's budget will as well so you can utilize a more comprehensive hosting solution. One form processing script I have used before is wufoo FREE Account Signup and Pricing for Premium Plans | Wufoo . ​
Copy link to clipboard
Copied
Ben M wrote:
If you don't mind me asking, why are you unable to use server-side scripting?
I need to do this for a bit of coursework, and their network seems to have blocked any sort of server side code.
I'm still learning how to use html, so the clarification from everyone has been really helpful. Thanks!
Copy link to clipboard
Copied
HTML forms don't DO anything without help from server-side scripts.
Ask your web host which form processing scripts you can use on your hosting plan.
If your server supports PHP scripts, this 3-part tutorial will teach you how to create a working contact form that:
Alt-Web Design & Publishing: Responsive Contact Form with Bootstrap 3.2 and PHP (Part 1)
Nancy
Copy link to clipboard
Copied
This is actually really funny. The reason your code doesn't work is the very reason you should not use mailto, which is that you don't have a mail client set up on your computer.
Your code actually works on my computer because I do have Microsoft Outlook set up.
So this should prove to you that mailto should NEVER be used.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now