Subsections

5.2 Electronic forms

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:

Interface:
 
As a survey instrument, electronic forms may provide a preferable interface for some people, compared with being interviewed by a person. However, this is a classic example of the double-edged nature of electronic forms because some people strongly dislike interacting with a computer for data entry.

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).

Cost:
 
Electronic forms are much cheaper to administer as a data collection tool because there are no copying expenses or postage.

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.

Aesthetics:
 
The physical layout and visual attractiveness of a form is known to have an influence on survey completion rates. An electronic form can more easily and less expensively include colour and images because there is no printing cost. It is also possible to arrange the form more expansively (i.e., use more whitespace) without concern about the cost of the additional space required.

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.

Nonresponse:
 
An electronic form requires the person entering the data to have access to a computer. This is not generally an issue for pure data entry, but if subjects are required to enter data themselves in an online survey, this can be a major disadvantage. Not only do the subjects have to have access to a computer, which depends on a certain level of personal and societal affluence, but the subjects also have to have a familiarity with fundamentals of computer hardware and software such as keyboards, mice, menus and dialog boxes.

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.


5.2.1 HTML forms

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:

A cross-platform standard:
 
HTML is an open standard and HTML forms should work with any web browser. This makes it a very accessible technology for creating electronic forms and it is also an advantage for deploying electronic forms because it does not impose high expectations on the users of the form in terms of their technical ability or in terms of their computing facilities.

A plain text computer language:
 
HTML forms are based on a text description (HTML code) so we can create a form just by writing computer code.

A familiar technology:
 
last, but not least, because we have already learnt a little about HTML, we are in a good position to press on with creating forms using HTML.

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.

Figure 5.3: An extract from the HTML code behind the electronic form version of I-94W (see Figure 5.2). This code shows that an HTML Form consists of plain HTML elements (as discussed in Chapter 1) and special form-related elements such as form and input.
 

<!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.

5.2.2 Other uses of electronic forms

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

Creative Commons License
This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.