PHPSuperBlog.com

HTML form element – Check box

In HTML form, sometimes you might like to let your user to select an option from your pre-made list. This is to avoid them from typing in a value which is not what you want them to input. In this case HTML form element – radio buttons could do the job, but what if in some cases, the user has to select more than one value? Check box is the answer, Here I have created an example to demonstrate the way to create check box:

I have created a HTML form with a set of check boxes which allows the user to select a few options from:

<html>
<form name="aform">
Choose which person the email will send to:
<br>
<input type="checkbox" name="email" value="email1@phpsuperblog.com">TOM
<br>
<input type="checkbox" name="email" value="email2@phpsuperblog.com">JOHN
<br>
<input type="checkbox" name="email" value="email2@phpsuperblog.com">MARY
</form>
</html>

The HTML form:

Choose which person the email will send to:

TOM

JOHN

MARY

Please notice that the emails above do not exist, they are just for this example.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Similar Posts:

Leave a comment