How can I make my form fields required?

  • Thread starter Demon117
  • Start date
  • #1
165
1
I am new to web design so forgive me if I come off as ignorant. Would some one direct me to a page or give me information on how to make my submit form fields required? Here is my current code:

Code:
<form name="contact" action="process.php" method="post">
<label>Name</label><br />
<input type="text" name="name" /><br />
<label>E-Mail</label><br />
<input type="text" name="email" /><br />
<label>Message</label><br />
<textarea name="message" cols="50" rows="10"></textarea><br />
<input type="submit" name="submit" value="Submit" />
</form>

Any help would be valuable. Thanks!
 

Answers and Replies

  • #3
18,490
8,354
You can use some simple Javascript validation
http://www.w3schools.com/js/js_form_validation.asp [Broken]
 
Last edited:

Related Threads on How can I make my form fields required?

Replies
13
Views
1K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
8
Views
4K
Replies
8
Views
6K
Replies
5
Views
1K
Replies
4
Views
10K
Replies
8
Views
2K
  • Last Post
2
Replies
32
Views
18K
Replies
3
Views
3K
Top