Thursday, July 9, 2009

The Web Forms Exercise For MAT 113

The Web form that we will be building on Monday is available here as an un-styled page, and here as a styled page. The HTML is identical.

Web forms typically generate emails containing the form results that might go, for instance, to a sales department. If you fill out the form, then click "Submit," the script will return the text that would appear in the body of an email generated. A representation of that code is here.

The script generator is here.

Here's a little sort-of glitch that I came across constructing this lesson: I have the first name and last name fields set up to be required fields. At the same time, I have values entered--"First name" and "Last name." So, if the user ignores those two fields, the SPRY validation will not betriggered when the user clicks the "Submit" button. If I were hand-coding this, I would write a script that did something like, If the value for fName is "First name," then trigger the SPRY widget thingie to throw an error. However, I can't figure out how to do this with DW. Yet.

This semester, I'm styling the form with CSS to give an indication of how CSS can be used with forms. Of course, if I were making an actual form, I'd do it in Flash, which has magnitudes more functionality and flexibility than a plain old HTML form ever will. Just ask Jill.

See also:
Further reading:
Class resources:

0 comments: