blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
8.2.4. Example Form Submission: Questionnaire Form Connected: An Internet Encyclopedia
8.2.4. Example Form Submission: Questionnaire Form

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1866
Up: 8. Forms
Up: 8.2. Form Submission
Prev: 8.2.3. Forms with Side-Effects: METHOD=POST
Next: 9. HTML Public Text

8.2.4. Example Form Submission: Questionnaire Form

8.2.4. Example Form Submission: Questionnaire Form

Consider the following document:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <title>Sample of HTML Form Submission</title>
    <H1>Sample Questionnaire</H1>
    <P>Please fill out this questionnaire:
    <FORM METHOD="POST" ACTION="http://www.w3.org/sample">
    <P>Your name: <INPUT NAME="name" size="48">
    <P>Male <INPUT NAME="gender" TYPE=RADIO VALUE="male">
    <P>Female <INPUT NAME="gender" TYPE=RADIO VALUE="female">
    <P>Number in family: <INPUT NAME="family" TYPE=text>
    <P>Cities in which you maintain a residence:
    <UL>
    <LI>Kent <INPUT NAME="city" TYPE=checkbox VALUE="kent">
    <LI>Miami <INPUT NAME="city" TYPE=checkbox VALUE="miami">
    <LI>Other <TEXTAREA NAME="other" cols=48 rows=4></textarea>
    </UL>
    Nickname: <INPUT NAME="nickname" SIZE="42">
    <P>Thank you for responding to this questionnaire.
    <P><INPUT TYPE=SUBMIT> <INPUT TYPE=RESET>
    </FORM>

The initial state of the form data set is:

    name
            ""

    gender
            "male"

    family
            ""

    other
            ""

    nickname
            ""

Note that the radio input has an initial value, while the checkbox has none.

The user might edit the fields and request that the form be submitted. At that point, suppose the values are:

    name
            "John Doe"

    gender
            "male"

    family
            "5"

    city
            "kent"

    city
            "miami"

    other
            "abc\ndefk"

    nickname
            "J&D"

The user agent then conducts an HTTP POST transaction using the URI `http://www.w3.org/sample'. The message body would be (ignore the line break):

   name=John+Doe&gender=male&family=5&city=kent&city=miami&
   other=abc%0D%0Adef&nickname=J%26D


Next: 9. HTML Public Text

Connected: An Internet Encyclopedia
8.2.4. Example Form Submission: Questionnaire Form

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609