An electronic form is a graphical user interface (GUI) for entering data into a computer. The main advantage of using such a form for data entry is straightforward: information can be checked for accuracy and validity at the time that it is entered.
An electronic form makes it easy to constrain the input to be one of a fixed set of valid responses (see Section 5.3), which improves the accuracy with which data are collected. There are also ways to perform higher-level checks on the consistency of information that is entered, for example, to eliminate the possibility of including in a data set male subjects who claim to have given birth (see Section 5.4).
For the administration of surveys, when compared to a pen-and-paper format, electronic forms provide a number of advantages beyond the efficiency and accuracy gains described above. However, there are also disadvantages to the use of electronic forms in surveys, so the best approach is to provide an electronic form as an optional submission format. For example, this is the approach taken by the National Survey of Student Engagement,5.1which surveys several hundred thousand students from North American colleges and universities each year.
Some of the advantages and disadvantages of electronic forms are briefly mentioned below:
The speed at which data can be entered is also an issue. For participants in a survey, this is unlikely to be an issue, but for data entry on a large scale, an electronic form can be much slower than data entry via a spreadsheet-like interface. On the other hand, an electronic form can be set up so that there is no need to use a mouse (i.e., shifting between fields and selecting items in the form can all be performed via the keyboard).
In contrast, for data entry, the development cost of an electronic form is much higher than just having someone type the data in using a text editor.
At the other end of the process, the layout of a pen-and-paper form needs to take into account the data entry personnel. For example, it is much easier (and less error-prone) to transcribe data from a pen-and-paper form if the answers are all horizontally aligned. There is no such constraint on the design of an electronic form.
Although electronic forms are not perfect in all ways, they are clearly an important additional tool in the process of data entry. In the rest of this chapter, we will discuss the creation and use of electronic forms and we will see how to create electronic forms in web pages using HTML.
There are many software systems for creating electronic forms. For example, forms can be created within Microsoft Excel to validate data that is entered into a spreadsheet and several database management systems, like Oracle and Microsoft Access, provide facilities for generating forms for data entry.
HTML forms are a good platform for creating forms for several reasons:
Figure 5.3 shows an excerpt from the code behind the I-94W electronic form in Figure 5.2.
The HTML code for the I-94W electronic form is larger and contains new elements compared to the plain HTML examples in Chapter 2, but the basic structure is the same: HTML tags around text content.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>I-94W online</title> <style> body { background-color: #9CF2CA; padding-top: 20px; padding-left: 5%; padding-right: 5%; } </style> </head> <body> <form action="http://www.formbuddy.com/cgi-bin/form.pl" method="post"> <p> <b>Do any of the following apply to you?</b> </p> <table> <tr><td valign="top">A.</td> <td valign="top"><input type="checkbox" name="ill"></td> <td>Do you have a communicable disease; physical or mental disorder; or are you a drug abuser or addict?</td></tr> <tr><td valign="top">F.</td> <td valign="top"><input type="checkbox" name="visa"></td> <td>Have you ever been denied a U.S. visa or entry into the U.S or had a U.S. visa cancelled?</td></tr> <tr><td></td> <td></td> <td>If yes, when? <input type="text" name="when" size=10> where? <input type="text" name="where" size=10></td> </tr> </table> <p> Country of Citizenship: </p> <table> <tr><td width=25%> <input type="radio" name="country" value="1"> Andorra</td> <td width=25%> <input type="radio" name="country" value="2"> Iceland</td> <td width=25%> <input type="radio" name="country" value="3"> Norway</td></tr> <tr><td><input type="radio" name="country" value="4"> Australia</td> <td><input type="radio" name="country" value="5"> Ireland</td> <td><input type="radio" name="country" value="6"> Portugal</td></tr> <tr><td><input type="radio" name="country" value="7"> Austria</td> <td><input type="radio" name="country" value="8"> Italy</td> <td><input type="radio" name="country" value="9"> San Marino</td></tr> <tr><td><input type="radio" name="country" value="10"> Belgium</td> <td><input type="radio" name="country" value="11"> Japan</td> <td><input type="radio" name="country" value="12"> Singapore</td></tr> <tr><td><input type="radio" name="country" value="13"> Brunei</td> <td><input type="radio" name="country" value="14"> Liechtenstein</td> <td><input type="radio" name="country" value="15"> Slovenia</td></tr> <tr><td><input type="radio" name="country" value="16"> Denmark</td> <td><input type="radio" name="country" value="17"> Luxembourg</td> <td><input type="radio" name="country" value="18"> Spain</td></tr> <tr><td><input type="radio" name="country" value="19"> Finland</td> <td><input type="radio" name="country" value="20"> Monaco</td> <td><input type="radio" name="country" value="21"> Sweden</td></tr> <tr><td><input type="radio" name="country" value="22"> France</td> <td><input type="radio" name="country" value="23"> the Netherlands</td> <td><input type="radio" name="country" value="24"> Switzerland</td></tr> <tr><td><input type="radio" name="country" value="25"> Germany</td> <td><input type="radio" name="country" value="26" checked> New Zealand</td> <td><input type="radio" name="country" value="27"> United Kingdom</td></tr> </table> <p> <center><input type="submit" value="submit"></center> </p> </form> </body> </html>
|
There are the standard html, head, title, and body elements ( lines 1 to 10), plus an example of embedded CSS rules (lines 5 to 8). The most important new elements are a form and several input elements, which create the radio buttons and the Submit button on the web page.
This demonstrates that creating an HTML form is simply a matter of learning a few more HTML elements, which we will look at in detail in the next section.
In addition to their role in data entry, electronic forms are also useful in a general sense as a graphical user interface. For example, a web page containing interactive elements such as buttons and checkboxes is essentially a dialog box. One application of this idea is to use an electronic form as a user-friendly interface to a data analysis program. This idea will be demonstrated later in the book in Section 11.13.
Paul Murrell
This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.