forms Flashcards
what is a form?
a form is a way to collect information from website users
what is the best known form on the web?
the google search box
what is a form control?
a form control is a way in which you can specify how information is gathered on the web
what is a text input
a text input is a form control that allows the user to enter single lines of text
what are text inputs used for?
give an example
text inputs are used for gathering single line amounts of information.
example: username, email address
what are password inputs?
password inputs are like text input except the information entered appears as bullets to ensure passwords are kept hidden
what is a text area?
a text area is a form control that allows multi line information
what are text areas used for?
text areas are used for messages such as comments
what is a radio button?
a radio button is a form control that allows a user to select one out of a number of options
what is a drop down box?
a drop down box allows a user to select on out of a number of options displayed in a drop down menu
what is a submit button?
a submit button is a button used to submit the information entered into the form to another webpage
how does a form work?
1) a user fills in a form and presses a button
2) the name of each form control is sent to the server with the values the user entered
3) the server processes the information using programming languages such as python and php
4) the server creates a new page to send back to the users browser browser based ion the information received
how can a server differentiate between different form controls and the information sent?
the server can distinguish what information came from what form control by using a name/value pair
what is a name/value pair?
a name/value pair is a combination of the name of the form control and the value entered, therefore it is vital that each form control has a name attribiute
what is the basic form structure?
1) form element
2) attributes: action and method for the form element
3) some form control elements
4) submit button