The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Need help with Form values
Patwalsh
post Oct 26 2006, 04:20 PM
Post #1





Group: Members
Posts: 1
Joined: 26-October 06
Member No.: 584



I want to set up a form that has a real simple box setup, but I want to restrict the send function to only send if all of the form is filled out. How is this possible? Any help is GREATLY appreciated. Below is what i have so far.
CODE
<html>
<body>
<form action="MAILTO:pwalsh@trustedconnexions.com" method="post" enctype="text/plain">

<h3>Register to request a Trusted Connexions brochure!</h3>
Name:<br>
<input type="text" name="name"
value="your name" size="20">
<br>
Phone:<br>
<input type="text" name="Phone"
value="your phone number" size="20">
<br>
Address:<br>
<input type="text" name="Address"
value="your mailing address" size="40">
<br>
Email:<br>
<input type="text" name="Email"
value="your email address" size="40">
<br>
Comment:<br>
<input type="text" name="comment"
value="your comment" size="40">
<br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">

</form>
</body>
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 26 2006, 04:35 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE
I want to restrict the send function to only send if all of the form is filled out


You can use javascript for this, but since javascript alone cannot be relied upon (since it can be disabled) you must also validate the form input in the form handling server-side script.

CODE

<form action="MAILTO:pwalsh@trustedconnexions.com" method="post" enctype="text/plain">


ACTION="mailto..." is unreliable. See also http://htmlhelp.com/faq/html/forms.html#mailto-form

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 26 2006, 04:47 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How can I require that fields be filled in, or filled in correctly?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:11 PM