Part 6 - Working with forms and collecting data Flashcards
what is a disadvantage of
Common gateway interface (CGI)
a disadvantage of this is that Every form returned to the server requires a new process to be created for the CGI script
describe the html tag
<.textarea></.textarea>
This tag can be used within a form to allow the user to enter multi line data such as an address or a comment or review. Any initial value can be supplied within the element itslef (ie between the tags)
what is the markup to:
1. create a hidden field
2. give it a unique identification of “a_name”
3. give it a default value of “a_value”
describe the following markup
<.input type=”hidden” name=”a_name” value=”a_value” />
describe the action attribute of the html form element
this is used to define where the form will be sent such as to a script on a server
describe the
name attribute
of the html input tag
this provides an identification for the tag which can be used by css or javascript
this can be accomplished by:
<.fieldset>
<.legend>Personalia:</.legend>
<.input>
…
…
</.fieldset>
**explained** <.fieldset> - this creates a boxing around our inputs <.legend> - this creates a legend for the boxed section
how can we divide our form up into sections
this provides an identification for the tag which can be used by css or javascript
describe the
name attribute
of the html input tag
this can be accomplished using:
Username: <.input type=”text” name=”user” />
how would we create a
username field
in a HTML form
describe the following markup
<.input type=”reset” name=”reset” value=”Reset” />
what is the markup that:
1. create a reset button
2. give it a unique identifier of reset
3. give the button text that says “reset”
this is the name/value data in the url after the ? and is seen when the http get method is used to send form data
what is a
query string
This defines the HTTP request method we would like to use such as GET or POST
describe the
method
attribute of the html form element
what is the role of a
firewall
Its role is to determine which packets should and should not be accepted:
This can occur when a server makes a request to you or even when you request data from a server.
this attribute when used with a radio button defines the group it belongs to (if this is selected other members of the group are deselected)
in the context of a html radio button describe the
name attribute
this is HTTP but is secured (encrypted) using the ssl/tls protocol
describe HTTPS
tells how to encode form data when the form method is ‘post’ (most commonly this is used to allow PHP, which you will encounter in Block 2, to accept file uploads).
describe the
enctype
attribute of the html form element
using this tag increases the accessibility of form fields by:
1.This will be read by screen readers
2.This itself acts as selectable so elements such as a radio button have a higher hit area
why should the <.label> tag be used with form fields to increase accessibility
give 2 reasons
this is used to define where the form will be sent such as to a script on a server
describe the action attribute of the html form element
this attribute can be used to have radio button selected by default
in the context of a html radio button describe the
** checked attribute**
describe how the html
type=”reset”
of the input tag works
Often ommited but can be used to reset all the form data back to there default values
describe the following markup
<.input type=”hidden” name=”a_name” value=”a_value” />
what is the markup to:
1. create a hidden field
2. give it a unique identification of “a_name”
3. give it a default value of “a_value”
this attribute specifies the maximum number of characters allowed in an input field.
describe the
maxlength attribute
of the html input tag
this is done using
<.form></.form>
how do we create a html form element
how can we divide our form up into sections
this can be accomplished by:
<.fieldset>
<.legend>Personalia:</.legend>
<.input>
…
…
</.fieldset>
**explained** <.fieldset> - this creates a boxing around our inputs <.legend> - this creates a legend for the boxed section
this can be accomplished using:
<.input type=”file” name=”upload1”/>
how do we create a
file upload button
in html