An introduction to the InternetAdvanced HTML (3) [Archives:2003/665/Education]
Academic Head
NCC Education, Yemen Center
Multiline Text Fields
A multiline text field is simply a multi-row version of the single line text field. It is used to return large amounts of text, whilst giving the user some simple editing capability within the field. The user can move freely around the field and change it easily before submitting it. The HTML code for a multiline text field as follows:
The ROWS and COLS attributes define the size of the display for the multiline field measured in characters. The text entered can be larger than this, in which case the field will scroll both horizontally and vertically. When the submit button is clicked, the whole field with its contents is returned. The browser will interpret the above code, along with the form tags, and displays the form as in Fig1.
Design Guidelines
We now have a reasonable selection of tools to create a form. They can be combined with the HTML construction information covered in the previous lessons to produce some very effective forms.
Some useful methods to achieve professional results:
– Use tables to line up buttons.
Radio buttons and other elements can be put in the cells of a table to ensure that they line up neatly.
– Do not overuse graphical buttons
It is possible to over-use graphics in buttons. Every graphic image requires time and bandwidth to display to the user. Most web site customers would rather have a form that displays quickly rather that one which looks pretty.
– Ensure that radio buttons have a common name.
If not, the radio buttons will behave as if they are not grouped. This will cause extreme confusion for the user and return multiple values to the web server and application.
– Ensure that there is only one SELECTED option unless list is MULTIPLE.
If more than one option is SELECTED in a list which is not MULTIPLE, the result is not defined by HTML. The browser will behave in an indeterminate fashion and the behavior is likely to be different with different browsers.
– Do not assume that the browser can validate input.
This is a common misconception. All meaningful validation must be carried out by the application program. This is irritating to users; it means that they may need to go back and correct a single field from a large form when they would expect this to be checked on entry.
Mailto Action
The MAILTO ACTION allows the contents of a form to be e-mailed to the address given. This is occasionally useful for real forms where the volume is low and no server side processing is needed. To send the form data to an e-mail address you change the form ACTION attribute as follows: