Page 310 - DCAP109_GRAPHIC_TOOLS
P. 310
Unit 13: Dreamweaver – Forms and Media Elements
To apply the <fieldset> tag in Dreamweaver, select a set of existing controls that you’d like to Notes
group and then clicking the Fieldset button in the Forms category of the Insert panel.
13.2.8 Providing Checkboxes and Radio Buttons
When the user has options to choose from in your form, checkboxes or radio buttons come in
handy. Checkboxes allow the user to choose multiple but radio button restrict your user to only
one selection from a number of options.
Checkboxes
Setting the type attribute of an <input> tag to checkbox places a checkbox element onto the web
page. A checkbox element can be placed onto a web page in a pre-checked fashion by setting the
checked attribute with a “yes” value. By doing so, this element will now default to a checked
status each time the HTML page is loaded.
Example:
<form action=”http://www.abc.com” method=”post”>
<p>Select your sport</p>
Soccer: <input type=”checkbox” name=”sports” value=”soccer” />
Football: <input type=”checkbox” name=”sports” value=”football” />
Baseball: <input type=”checkbox” name=”sports” value=”baseball” />
Basketball: <input type=”checkbox” name=”sports” value=”basketball” />
</form>
Output
Source: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_checkbox
To create checkboxes in Dreamweaver, select or drag the CheckBox object from the Insert panel
or choose Insert ! Form ! CheckBox.
Radio Buttons
Radio buttons are used when you want to let the visitor select one – and just one – option from
a set of alternatives.
Example: A
<form action=” “ method=”POST”>
<div align=”center”><br>
<input type=”radio” name=”group1" value=”Milk”> Milk<br>
<input type=”radio” name=”group1" value=”Butter” checked> Butter<br>
<input type=”radio” name=”group1" value=”Cheese”> Cheese
<hr>
<input type=”radio” name=”group2" value=”Water”> Water<br>
<input type=”radio” name=”group2" value=”Beer”> Beer<br>
LOVELY PROFESSIONAL UNIVERSITY 303