Presentation on theme: "Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),"— Presentation transcript:
Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.), controls. When a form is submitted, all fields on the form are being sent. The tag tells the browser where the form starts and ends with. You can add all kinds of HTML tags between the and tags.
Controls Users interact with forms through named controls. control "control name" is given by its name attribute. Each control has both an initial value and a current value, both of which are character strings.
Control types Text Fields Password Field Text Areas Radio Buttons Checkboxes Selection List Button …….
Forms Text Fields Text fields are used when the user to type letters, numbers, etc. in a form. Eg: First name: Last name:
Forms Text Areas Text areas are used for multiple-line text entry. The default size of the text box is 1 row by 20 characters. Change the size using the COLS and ROWS attributes. example of a text area with a text box 40 characters wide by 7 rows
Forms Radio Buttons Radio Buttons are used when user to select one of a limited number of choices. Male Female
Forms Checkboxes Checkboxes are used when the user to select one or more options of a limited number of choices. I have a bike I have a car:
Forms The tag is used to create a drop- down list. popo peepe momu akku
Forms Button To create a button three types of buttons submit buttons: reset buttons: push buttons:
Forms Submit Button submit buttons: When activated, a submit button submits a form. A form may contain more than one submit button. defines a submit button. A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute Username:
Forms Reset button reset buttons: When activated, a reset button resets all controls to their initial values. Used to reset all values in the form
Forms push buttons: Push buttons have no default behavior. Each push button may have client-side scripts associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.), the associated script is triggered.
Forms HTML Forms A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. The tag is used to create an HTML form:. input elements.
Forms action URL Specifies where to send the form- data when a form is submitted action Method get and post Specifies the method to use when sending form-data name name Specifies the name of a form name get Adds the form-data to the URL in URL?name=value&name=value post Sends the form-data as an HTTP post transaction
Forms popo Registration Form First Name Last Name Address Sex Male Female Hobby Reading Dancing Sleeping Watching TV State
Forms popo peepe momu akku District popo peepe momu akku User Name Password Confirm Password
REDIRECT VIA SUBMIT <FORM METHOD="GET" ACTION="index.htm"