Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

Grouping Controls

July 10, 2002

Once you've decided  on the form controls, you can put them on a page. Often, the data you collect can be split up into logical units requiring related answers – such as details about the users themselves, details about their interests and hobbies, details about orders they would like to make, and so on.

In order to help the user fill in the form, and to make it intuitive, you should group related items of information together (these should correspond to the groupings we suggested you come up with before designing the form).

When grouping information , make sure that you don't ask for the same information twice. If you've repeated any questions, can you use a technique (such as a hidden field or server-side storage) to remember what the user has already entered?

It is important that groupings reflect the user's understanding of the topic, rather than an internal company understanding of the topic or one relating to how the information will be used.

As we said earlier, if you must ask for data that's not directly relevant to the task in hand, you should put it at the end of the form . Remember to clearly indicate which controls are mandatory and, where possible, which are optional. If you use some kind of marker (for example, an asterisk) to identify mandatory data, then the absence of that marker will imply that individual items are optional; even so, if you have a whole section of controls that are optional, they should be explicitly marked as such.

Using <fieldset> Elements

As we saw in Chapter 1, you can use special elements to group together sections of a form: the <fieldset> and <legend> elements. The <fieldset> element simply contains a group of form controls, and it can have a <legend> element as a child to caption the box (we also looked at offering keyboard shortcuts to these  fieldsets in Chapter 1).

	
<form>
<fieldset>
<legend>[Section C]  <em>Marital Status</em></legend>
<h4>[Question 10] What is your marital status?</h4> 
<input type="radio" name="radMaritalStatus" value="single" />Never Married
<em>(If selected go to Question 14)</em><br />
<input type="radio" name="radMaritalStatus" value="married" />Married<br />
<input type="radio" name="radMaritalStatus" value="separated" />Separated
<br />
<input type="radio" name="radMaritalStatus" value="divorced" />Divorced
<h4>[Question 11] Is your partner applying with you?</h4>

      ...

</fieldset>
</form>

Fieldsets were only introduced in IE 4+ and Netscape 6; however , older browsers will just ignore them. The typical rendering of fieldsets looks something like this (ch02_eg4.htm):

You may choose your own alternative to fieldsets, such as line breaks or using  a table, but grouping of related questions will help the user to understand the form better. The advantage of using tables is that they will be available to more browsers. However, fieldsets have been introduced specifically for the purpose of grouping data, and they are likely to be used more and more in the future.

Drop-down Menus and Select Boxes
Usable Forms for the Web
Using Labels


Up to => Home / Authoring / HTML / Usable_Forms




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers