1 HTML Forms

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
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
XP Tutorial 6: Creating Web Page Forms. XP An Example of a Form.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 6: Creating Web Page Forms.
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 6 1 New Perspectives on Creating Web Pages with HTML Tutorial 6: Creating Web.
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.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
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 5 Java Script And Forms JavaScript, Third Edition.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
HTML II. Factors to consider in designing a website. Organizing your files. HTML Tables. Unordered Lists. Ordered Lists. HTML Forms. Learning Objectives.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 6: Creating Web Page Forms.
Forms Sangeetha Parthasarathy 02/05/2001. Introduction to Forms A form makes it possible to transform your web pages from text to graphics to interactive.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 7: Web Forms.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 7: Web Forms © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
HTML Concepts and Techniques Fourth Edition Project 7 Creating a Form on a Web Page.
 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.
1 HTML Forms
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
ITCS373: Internet Technology Lecture 5: More HTML.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
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.
1 HTML Forms
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
1 HTML Forms
XP 1 Tutorial 6 Creating Web Page Forms. XP 2 Tutorial Objectives  Describe how Web forms can interact with a server-based program  Review the various.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Form Components and Elements
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
Creating Web Page Forms COE 201- Computer Proficiency.
HTML Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
HTML Forms.
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
1 HTML Forms
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
1 HTML forms (cont.)
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Tutorial 6 Creating a Web Form
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
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.
ITE 115 Creating Web Page Forms
New Perspectives on Creating Web Pages with HTML
Introducing Forms.
CNIT 131 HTML5 - Forms.
Chapter 6: Creating Web Page Forms. An Example of a Form.
HTML Forms
Presentation transcript:

1 HTML Forms

2 Form components and elements This figure shows a form that contains various control elements commonly used in Web page forms. First Name Address #1 Address #2 City Last Name Country StateZip Item PurchasedPurchase Date Home Business Government Educational Institution Netware Banyan Vines Windows IBM Lan Server Comments?: Send Registration Cancel Serial Number Used For (check one) Network Operating System (check all that apply) Religious or Charitable Institution PC/NFS text box drop-down list box radio buttons check boxes text area form button

 How to create o Form structure o Fieldset to group different forms o Textbox   How about password box? 3 What have we learned so far…

4 Creating a password field  A password field is a text box in which the characters typed by the user are displayed as bullets or asterisks i.e. ****.  The syntax for creating a Password field is:  Using a password field is NOT equivalent to having a secure connection.  The password itself is NOT encrypted.  The password field only acts as a mask for a field entry as it is entered.

5 Next form element  What if the choice must be made from a pre-determined set of items? o Drop-down element or selection list

6 Using a Selection List

7 Creating a selection list  a selection list is a list box from which a user selects a particular value or set of values  good for that a fixed set of possible responses is to be selected  help prevent spelling mistakes and erroneous entries.  Created using tag.  The tag is used to specify each of the selection items.

8 Using & tags  general syntax for and tags is: item1 item2. o name and id attribute identify the selection field o each tag represents an individual item in the selection list o the text in the selection list is indicated by the text in item1, item2, and so forth

9 So you get a Selection List as shown below… size = "1" size = "9"

10 Modifying the appearance of a selection list  By default, the tag displays one option from the selection list, along with a list arrow to view additional selection options  The number of options displayed can be modified with the size attribute.  The syntax of the size attribute is: o value is the number of items that a selection list displays in the form o by specifying a value greater than 1, the selection list changes from a drop-down list box to a list box

11 Selection lists with different size values size = "1" size = "4" size = "7" size = "9" if the size value equals to the number of options in the selection list, scroll bar is either not displayed or is dimmed

12 Making multiple selections  The previous drop-down list allows us to choose only one item at a time…  What if the user needs to choose multiple items from a selection list?  What do we do as the web designers?

13 Making multiple selections  Adding the multiple attribute to the tag allows multiple selections from a list.  The syntax for this attribute is: …  A common method to make multiple selections from a selection list is to hold down a specific key while making selections. o for noncontiguous selections, press and hold the Ctrl key while you make your selections o for a contiguous selection, select the first item, press and hold the Shift key, and then select the last item in the range

14 Additional advantage: Setting default option  Specify which of the options should be selected automatically by default by the designer,  Using selected attribute  Syntax for this attribute is: text

15 Working with option groups  the most recent releases of HTML allows you to organize selection lists into distinct groups called option groups a single option group option group label

16 Option Groups (generic structure) label label

17 Create the following option groups a single option group option group label

18 Working with radio buttons  Radio buttons display a list of choices from which a user makes a selection.  Only one radio button can be selected at a time.  The syntax to create a radio button is: o name identifies the field containing the radio button o id attribute identifies the specific option. Only required if you intend to use a field label with the radio button o value attribute indicates the value sent to the CGI script, if that radio button is selected by the user

19 Working with radio buttons (cont.)  The name attribute must be included, because it groups distinct radio buttons together. o selecting one radio button in the group automatically deselects all of the other radio buttons in that group  Insert descriptive text next to the button.  Enclose text within a label tag to allow the user to select the radio button or label.

20 Selection lists vs. radio buttons  Use selection list, if o you have a long list of options o you want to allow users to select more than one option (use a selection list with the multiple attribute)  Use radio buttons, if o you have a short list of options, and only one option is allowed at a time

21 Working with check boxes  Check box is another similar control element used for selection purpose…  A check box is either selected or not, there is only one check box per field.  Check boxes are created using the following syntax: o name and id attribute identify the check box o the value attribute specifies the value that is sent to the CGI script when the check box is selected  To select a check box by default

22 Creating a text area  We have seen text box…now we create text area…mostly used for comments from users  to create a text area for a text box, use tag default text o rows and cols attributes define the dimensions of the text box o rows attribute indicates the number of lines in the text box  default text can be specified in the text box when the form is initially displayed.

23 Creating a text area (cont.) resulting text area dimensions of text area default text Comments Enter comments here.

24 Using wrap attribute (cont.)  wrap user ’ s comments to the next line in the text area  value of wrap attribute is soft, hard or off o soft value automatically wraps the text to the next line when it exceeds the width of the box o hard value also wraps text automatically, in the meantime, preserves any line wrapping that takes place in the text box when sending it to CGI o off value sets all the text to be displayed in a single line  default value for wrap attribute is soft