|Jean LeLoup & Bob Ponterio
In this lesson we will add interactivity on a web page by setting up a form, making some form fields, and mailing student input to the teacher (or simply printing the page with the student input).
Inserting Form Fields
Interactive fields must be located within a Form. A web page form is easy to set up, however forms can be confusing to beginners because they are NOT visible. This is where we need to become "the man behind the curtain." This can be done by editing the HTML Source or by inserting the form tags while editing a page in KompoZer. Everything between the open form tag <form> and the close form tag </form> is part of the form, and any data entry fields (form fields) must be located inside of a form in order to work.
The <form> tag can include additional parameters that determine what the form will do with anything that the student types, but these are not needed for our purposes. In the following example, we see a form that will email something to the teacher, but your form doesn't need to be set up to do this in particular, It is enough to have just the open and close form elements.
To create the Form in Kompozer, use the Insert / Form / Define Form menu item and insert the following into the window:
Form Name="verb quiz"
If you look at the HTML Code for the form, you will see something like :
<form method="post" action="mailto:fakeaddress" name="verb quiz"><br>
However, all we really need for our purposes are the two simple form tags. The form elements need to be inserted within the form area (in other words between the <form> </form> tags).
It can be useful to use the split view for both Design and Source in order to better see where things are. In Design view, you will see a blue dotted line around the form area. You can even put all of the content of your page into this form area.
In Kompozer, use Insert/Form/Form field... to place the elements in the form area.
For the moment, simply getting the form elements (most importantly the textbox) on your page within a form area is enough. Practice, and when you feel comfortable doing this, then go on to the next step.
The most common mistakes students make are forgetting the <form> tags or giving multiple form elements the same name.
Processing Student Input
There are many ways to process information from the text boxes, textareas, menus, radio buttons, and other form fields. Most of these involve computer programming that is beyond the scope of this lesson. Data can be sent to and processed by:
The cgi script and asp page run on a remote computer and receive form data from the student through the Internet. In addition to sending feedback to the student, they are capable of storing student responses in a database for subsequent examination by the teacher. These techniques are not very complicated for someone with basic computer programming skills but do require such skills as well as access to certain server privileges. Most teachers will not want to tackle these.
- a cgi script - a computer program running on a server.
- an asp web page - an active server web page with programming built-in.
Non-programmers might get help from a programmer to create a basic general purpose routine to do something with student input and then reuse this same program on multiple web pages. One may also find sample utilities online that can be used as is or slightly modified and integrated into your pages. It is possible to find utilities that will allow the answers to be stored.
Using pop-up windows to provide feedback
Providing an online answer key or placing answers in pop-up windows may be more manageable in many cases. This method allows the student to check his or her own answers against the teacher's model. See our lesson on glossing or annotating tests for the technical details. The following new form shows examples of how the pop-up window technique might work for the same set of questions shown above:
Form fields help make your web pages more interesting by involving the students actively. Many techniques can be used:
- A computer program manipulating or capturing the student answers
- A mailto submission sending student responses to the teacher
- Pop-up windows or full web page answer keys helping students check their work
- Hiding the answer on the page and revealing it when approriate
- Printing the web page itself with the answers to be handed in
By having the student do something with the language and actually manipulate information on the screen, the page becomes interactive and helps limit the potential passivity of any medium that sends information only in one direction.
Some of these sites are appropriate for relative beginners, but others may be considerably more complex.
EchoEcho.com Tutorials: Web Forms : http://www.echoecho.com/htmlforms.htm
HTML Goodies - HTML Forms : http://www.htmlgoodies.com/tutorials/forms
Editing KompoZer Forms: http://anh.cs.luc.edu/python/hands-on/examples/www/commonFormFields.html
How to Add a Feedback Form to Your Website Using KompoZer: http://www.thesitewizard.com/gettingstarted/kompozer-tutorial-5.shtml
Dreamweaver- How to create a web form : https://helpx.adobe.com/dreamweaver/how-to/create-web-form.html