ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms)

Slides:



Advertisements
Similar presentations
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Advertisements

XP 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
USER INTERACTIONS: FORMS
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Forms and Form Controls Chapter What is a Form?
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 Review of Form Elements. 2 The tag Used in between tags.  Form elements(text control, buttons, etc.. ) goes here. OR  Form elements(text control,
HTML Forms a form is a container for input elements on a web page input elements contain data that is sent to the web server for processing.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
HTML Forms.
Week 10: HTML Forms HNDIT11062 – Web Development.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
Client-Side Internet and Web Programming
How to Write Web Forms By Mimi Opkins.
Introduction to HTML Forms and Servlets
CS3220 Web and Internet Programming HTML Tables and Forms
HTML Forms Pat Morin COMP 2405.
FORMS IN HTML.
>> More on HTML Forms
(and available form fields)
Lists-Tables-Frames Unit - I.
FORMS Explained By: Sarbjit Kaur.
ITE 115 Creating Web Page Forms
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Web Programming– UFCFB Lecture 10
Today - Forms! WD Students produce a basic HTML/XHTML document using forms. Find the group that best matches the part of the project you are going.
Designing Forms Lesson 10.
Introducing Forms.
1.5 FORMS.
Creating Form Elements
Creating Form Elements
Forms Data Entry and Capture
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
CNIT 131 HTML5 - Forms.
Web Development & Design Foundations with H T M L 5
CS3220 Web and Internet Programming HTML Tables and Forms
Creating Forms on a Web Page
HTML Forms 18-Apr-19.
© Hugh McCabe 2000 Web Authoring Lecture 8
Lesson 6: Web Forms.
Unit 5 Create Forms.
Presentation transcript:

ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms) ICT DEPARTMENT WEB DESIGN(html forms)

Recap HTML tables Table tag Table tag attributes <tr> and <td> attributes

HTML Forms HTML Forms are required when you want to collect some data from the site visitor. For example during user registration you would like to collect information such as: name, email address, credit card, etc

HTML Forms…. An HTML form is a section of a document containing normal content plus some controls such as Checkboxes radio buttons Menus text fields Textarea etc

HTML Forms…. Every form in a document is contained in a FORM tag The FORM tag specifies the action that takes place when the form is submitted A form will take input from the site visitor and then will post it to back-end application such as CGI,ASP script or PHP script.

The FORM Tag The HTML <form> tag is used to create an HTML form and it has following syntax: <form action="Script URL“method="GET|POST"> form elements like input, textarea etc. </form>

Form Attributes Apart from common attributes, following is a list of the most frequently used form attributes:  action Backend script ready to process your passed data. method Method to be used to upload data. The most frequently used are GET and POST methods.

Form Attributes…. target Specify the target window or frame where the result of the script will be displayed. It takes values like _blank, _self, _parent etc. enctype You can use the enctype attribute to specify how the browser encodes the data before it sends it to the server. Possible values are: application/x-www-form-urlencoded - This is the standard method most forms use in simple scenarios.  mutlipart/form-data - This is used when you want to upload binary data in the form of files like image, word file etc.

GET or POST Forms should use METHOD="GET" when the form does not modify anything on the server: – A search engine query – A database search  

GET or POST…. Forms should use METHOD="POST" when the form changes the state of the server or sends a large amount of data – Entering a message on a forum – Uploading a file GET and POST transport the form data in different ways  

Form Controls The devices that allow input of data onto a form are called the controls Menus Text Input Controls Checkboxes Controls Radio Box Controls Select Box Controls File Select boxes

Form Controls….. Menus Hidden Controls Clickable Buttons Submit and Reset Button

The INPUT Tag The INPUT tag is a multipurpose tag that creates many different types of controls The type of input is controlled by the TYPE attribute – Can be TEXT, PASSWORD, CHECKBOX, RADIO, SUBMIT, RESET, FILE, HIDDEN, IMAGE, or BUTTON

The INPUT Tag…. Almost all of these should have a NAME attribute Their initial state can be set with a VALUE attribute They can all be disabled with DISABLE An INPUT tag is never closed (no </input>)

Checkboxes <input type="checkbox" ...> The NAME attribute names this checkbox The CHECKED attribute (with no value) is used to indicate a pre-checked checkbox

Checkboxes…. The VALUE attribute specifies the value bound to name if this checkbox is submitted (default = ON) Check all that apply:<br> <input type="checkbox" name="dogs">I like dogs<br> <input type="checkbox" name="cats">I like cats<br> <input type="checkbox" name="pigs">I like pigs

Radio Boxes <input type="radio" ...> Used when user is to select one of many mutually exclusive options   Radio buttons with same name form a group of mutually exclusive options In logic and probability theory, two propositions (or events) are mutually exclusive or disjoint if they cannot both be true (occur). A clear example is the set of outcomes of a single coin toss, which can result in either heads or tails, but not both.

Radio Boxes… Select <em>one of</em> the following:<br> <input type="radio" name="agree“ checked value="a">I agree completely<br> <input type="radio" name="agree“ value="b">I agree a little<br> <input type="radio" name="agree“ value="c">I disagree a little<br> <input type="radio" name="agree“ value="d">I disagree completely<br>

Text Boxes <input type="text" ...> Allows entry of one line of text  Attribute SIZE specifies the width (in characters) Attribute MAXLENGTH specifies the maximum number of characters

Text Boxes… User's full name: <input name="fullname" type="text" size="30“ maxlength="50">

Passwords <input type="password" ...> Identical to a text box, but text typed into the box is not readable Useful for submitting sensitive information (like passwords)

Buttons <input type="submit" ...> – Creates a button that submits the form to the server <input type="reset" ...>  – Creates a button that resets all form fields to their default state 

Buttons… <input type="button" ...> – Creates a button that does nothing  <input type="submit" value="Submit Form Data">

Buttons… The BUTTON tag provides similar functionality but with a bit more flexibility  Attributes are NAME, VALUE, and TYPE  TYPE can be SUBMIT, BUTTON, RESET <button name="sb" value="sbData" type="submit"> Submit All Form Data Now </button>

Buttons… Main difference is that the button label is text within the tag instead of the VALUE attribute

Image Buttons <input type="image" ...> Displays an image that behaves like a submit button The SRC attribute specifies the location of an image file The ALT attribute specifies some text to render if the image is not displayable <input type="image" src="button.png" alt="Submit">

Hidden Control <input type="hidden" ...> Creates a control similar to a text control – User does not see control – User can not easily change the value Useful for keeping track of data as the user traverses a collection of pages <input type="hidden" name="hiddendata“ value="Hidden Data in Here">  

Text Area The TEXTAREA tag provides a multiline text entry area   The ROWS and COLS attributes are required and they specify the number of rows and number of columns

Text Area…. <textarea rows="30" cols="50" name="bigtext">  The preformatted initial text is sandwiched within the tag. </textarea>  

Menus Drop-down menus are created using the SELECT tag   Attribute SIZE determines how many rows to display at once Each option is enclosed in an OPTION tag

Menus… <select name="country" size="5"> <option value="AB">Abkhazia</option> ... <option value="ZB">Zimbabwe</option> </select>

Menus… The MULTIPLE attribute of the SELECT tag creates menus that allow multiple selections   Options can be grouped hierarchically using the  OPTGROUP tag

Labels The LABEL tag specifies that the enclosed item is a label for the named form element For example, clicking the label will shift the focus or change the state of the associated form  

Labels… Check all that apply<br> <input type="checkbox" name="doglover" id="dogs" checked> <label for="dogs">I like dogs</label> <br> <input type="checkbox" name="catlover" id="cats"> <label for="cats">I like cats</label> <br>  <input type="checkbox" name="piglover" id="pigs"> <label for="pigs">I like pigs</label>  

Fieldsets The FIELDSET tag is used to group together a set of related form elements The LEGEND tag assigns a caption to a field set  

Fieldsets… <fieldset> <legend>Personal Information</legend> First Name: <input type="text" name="fn" size="20"> <br> Last Name: <input type="text" name="ln" size="20"> <br> Date of Birth: <input type="text" name="dob" size="10"> </fieldset>

Summary HTML forms allow users to input data that is submitted to a web server  We have seen several types of controls  Other options  – File selection (for upload) – Tabbing navigation (TABINDEX attribute) – Access keys (ACCESSKEY attribute)  – Disabled and read-only controls For more information and options, see http://www.w3.org/TR/html4/interact/forms.html