Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
What code do you add to my form to make the person confirm?
I want to put a checkbox that confirms everything is correct. Can you add the code to mine to make it so they cannot submit the form if they didn't check the box.
Here is the code:
<FORM>
<Form Action="mailto:Blank" Method="POST" Enctype="multipart/form-data" name="Submission">
First Name: <br>
<input type="text" name="firstname" /><br><br>
Last Name: <br>
<input type="text" name="lastname" /><br><br>
E-Mail: <br>
<input type="text" name="lastname" /><br><br>
<br />
Check This Box if you have confirmed everything you have typed in.
<input type="checkbox" name="confirm" value="Check This Box if you have confirmed everything you have typed in."
<br />
<br />
<br />
<input type="submit" value="Send">
</form>
By the way, I know that the "mailto" says "blank" because I don't want to give out the peoples email that the form is submitted to :)
5 Answers
- 1 decade agoFavorite Answer
Do you mean Validation?
You can get the sources code here
- Anonymous1 decade ago
Send the submit button to a Javascript routine that checks that not only is the box checked, but the email looks like a valid email address (1 and only 1 @, no dots directly before or after the @, etc.) and the names aren't blank. If there's a problem, pop an alert box and return false. If everything is good, return true and the email program will pop up.
HTML itself doesn't do anything but submit a form. Anything else requires program code of one sort or another.
- Anonymous1 decade ago
The best solution is a server-side language to validate everything in the form. You can like also said above use Javascript to validate. The problem is when a user may have Javascript turned off, then if you were strictly relying on it to validate, you no longer have a validation method.
On the server-side this would be exceptionally easy with a little bit of PHP.
And you can't use mailto: like that, it will only open the client's email program like said above also. So by the looks of it, you're going to require a server-side language for best results.
Others also include PERL, ASP, ASP.NET, etc.
- Anonymous1 decade ago
Not gonna happen with a "mailto:" as that calls the User's own mail program. Use a server-side script language if your web site allows it.
Just use any of the below sites to make the workable form you need:
For making forms:
These are really good online form makers. Just follow the instructions for making it and uploading file(s).
http://www.tele-pro.co.uk/scripts/contact_form/
http://www.thepcmanwebsite.com/form_mail.shtml
Warning, your current hosting package must allow SMTP ( http://en.wikipedia.org/wiki/Simple_Mail_Transfer_... ) to work. Otherwise, no email can be sent.
Ron
- How do you think about the answers? You can sign in to vote the answer.
- Anonymous1 decade ago
Have a submit button be inactive but become active upon the checkbox being checked.