The key to pick the right form control is first to think about what you want to do, But
not how do you want to do it.
A D V E R T I S E M E N T
Consider for an example, The 'choose one thing from
this list ' is good example of "what to do", and the 'radio buttons'
is good example of "how to do it". In short, you need to think about an intent of each of the
This kind of thinking is important, since the XForms is designed to use beyond the
conventional desktop environments. Consider for an example, the same form could be
deployed across the small-screen devices, perhaps the phone or the PDA, or a eyes-free
devices, perhaps over a phone.
The Form controls listed
The following list of the form controls helps you to focus on the intent behind each of
the form control. After that, you will learn how to fine-tune the presentation of the form
controls. A list of all form controls, with an intent of each
Entry of an free-form value
The edit box, The voice prompt
Entry of the large amounts of free-form of text
An email body, weblog entry
Entry of the sensitive information
The password prompt
Choice of an one-and-only-one item from the list
The radio buttons, drop-list
Choice of one or more items from the list
The checkbox group, listbox
Selecting a value from the range
The slider, volume control
Selecting the data source
The file picker, a digital camera interface
Activating the defined process
The button, hyperlink
Activating submission of a form
The submit button
Display-only of the form data
the inline text
Every form control has a required label child (except output, where it's optional). This
enforces the good design habit of always associating a label with a form control. Other
common child elements are help for a message at the user's request, hint for a message
at the user agent's request, and alert which is available for error messages.
Adjusting the appearances
Each of the form control also accepts the attribute named appearance, allowing the finer
control of an appearance but without going so far as to completely break down the
separation between the content and a style. The attribute do accepts three predefined
values,the full, compact, and the minimal.
These attributes do give the guidance, in general terms, of how the form control must be
rendered. Consider for an example, the full rendering of the select1 would attempt
to show an every possible choice, for example the large radio button group. On the other
extreme, minimal might present only the tiny one-line list that will have to be expanded
to see the choices. A third alternative, compact, would provide the happy middle ground.
Keep in mind that these are only the suggestions to an XForms engine--for example on the
tiny screen, all the select1 controls might work as the pop-ups.
Carefully examine the following form control examples, then compare with the live rendering below.