4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.

Slides:



Advertisements
Similar presentations
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
Advertisements

24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
Tutorial 6 Creating a Web Form
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Forms cs105. More Interactive web-pages So far what we have seen was to present the information. (Ex: tables. Lists,….). But it is not enough. We want.
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.
Gathering Requirements What do users want?. Information Gathering Techniques Surveys Interviews Focus Groups.
Computing Concepts Advanced HTML: Tables and 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.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
CST JavaScript Validating Form Data with JavaScript.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
HTML Forms What is a form.
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.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
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.
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.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Suzanne J. Sultan Javascript Lecture 2. Suzanne J. Sultan function What is a function> Types of functions:  Function with no parameters  Function with.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
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.
1 HTML Forms
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
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.
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.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
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.
Starting BBEdit or Notepad and Opening the HTML File Start BBEdit or Notepad Select Open from the File Menu Open survey1.htm from the Public Folder.
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 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.
Week 10: HTML Forms HNDIT11062 – Web Development.
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.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
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.
Chapter 5 Validating Form Data with JavaScript
How to Write Web Forms By Mimi Opkins.
Designing Forms Lesson 10.
© Hugh McCabe 2000 Web Authoring Lecture 8
HTML Forms
Unit 5 Create Forms.
Presentation transcript:

4-Sep-15 HTML Forms Mrs. Goins Web Design Class

Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information for a form is stored in a Field. The value itself is called Field Value. 2

Parts of a Web Form Users enter or select a field using Form Control/ Elements. Form/Control elements include: buttons, checkboxes, text fields, radio buttons, drop-down menus, etc A form usually contains a Submit button to send the information in the form elements to the server 3

Control Elements Input Boxes – for text and numerical entries Option Buttons, also called Radio Buttons – for selecting a single option from a predefined list Selection Lists – for long lists of options, usually appearing in a Drop-Down List Box Check Boxes – for specifying yes or no Text Areas – for extended entries that can include several lines of text 4

5 HTML Forms The basic construction of a HTML form is this... - begin a form - ask for information in one of several different ways - there can be as many input areas as you wish - end a form HTML form

Forms and Server-Based Programs Forms are used to collect information. The information is then sent back to the server. Information is stored and analyzed using a program on the server. By giving users access to programs that react to user input, the Web became a more dynamic environment where companies and users could interact. 6

Forms and Server-Based Programs Server-Based programs provide: Online databases containing customer information Online catalogs for ordering and purchasing merchandise Dynamic Web sites with content that is constantly modified and updated Message boards for hosting online discussion forums 7

Forms and Server-Based Programs Because these programs run on Web servers, rather than locally, users might not have permission to create or edit them. Instead, users will receive information about how to interact with the programs on the server. Several reason to restrict direct access: When you run a server-based program, you are interacting directly with the server Security risks (computer hackers) Drain on system resources caused by large number of programs running simultaneously 8

Forms and Server-Based Programs Server-Based Programs Common Gateway Interface (CGI) Scripts Most common ASP Cold Fusion C/C++ PHP VBScript The Web server determines which language your Web form will use. 9

10 Getting Started The first step in creating a form is to specify the name and location of the CGI script that will be used to process the form data. To do this, type the following code within your HTML file, and note that there are no spaces: For example, if your address is you would enter:

11 Text Input (type=“text”) A Text Field: used to create one line fields that viewers can type text. The default width is 20 characters, and you can create fields of other sizes by the value in the size option. You can limit the number of characters by the value of the MAXLENGTH option. Text input fields will be empty when the page loads, unless you provide an initial text string for its VALUE option

12 Text Input (type=“text”) Example 1: A text field named "text1" that is 30 characters wide. Example 2: A text field named "text2" that is 30 characters wide but will only accept 20 characters. Example 3: A text field named "text3" that is 40 characters wide with default value.

13 Password Input (type=“password”) are exactly the same as text input elements, except that when the viewer types in, they see "bullet" characters rather then the letter they are typing. Password text is scrambled during transmission and then unscramble when the form data is received at the server end. Example 4: A password field named "pass1" that is 30 characters wide Example 5: A password field named "pass2" that is 30 characters wide but will only accept 20 characters

14 Text Input (type=“textarea”) Text fields that have more than one line and can scroll as the viewer enters more text. The tag options define the size of the field by the number of rows and character columns. By adding the option WRAP=VIRTUAL, the text entered will automatically wrap at the right hand side of the field. You can also include default text to appear in the field Example 6: A textarea field named "comments" that is 45 characters wide and 6 lines high The first time I ever saw a web page, I thought.... (continue)

15 Adding Control Buttons A form must include at least one control button for submitting the information once it is filled out. In addition, forms often include a button for resetting all the entries if a person wants to start over. When a person presses the submit button, he or she will receive confirmation that the form results were sent to your address. You will then see an message in your Inbox with the subject FORM results.

16 Adding Control Buttons A submit button: A reset button: submit : send data reset : restore all form elements to their initial state Note that the type is input, not “button”

17 Radio buttons (type=“radio”) Are sets of controls that are linked so that only one radio button among each set is selected at a time If you click one radio button, the others in the set are automatically de- selected A set of radio buttons is defined by providing them the same name The value sent in the web form is the value of the radio button that was last selected Adding the option CHECKED to one of the buttons in a set will make that button highlighted when the page loads Radio buttons do not contain any text

18 Radio buttons (type=“radio”) Radio buttons: male female

19 Checkboxes (type=“checkbox”) Are similar to radio buttons, but are not affected by other buttons, so you can have more than one in a group checked at a time Note that every checkbox has a unique name. If there is no check in the box, clicking it will place an X or a check mark there If the box is checked, clicking it again will remove the mark. The value sent in the web form is the value of the checkbox if it was selected; otherwise the value will be empty Adding the option CHECKED to a checkbox will make that checkbox highlighted when the page loads.

20 Checkboxes (type=“checkbox”) A checkbox: type : “ checkbox” name : used to reference this form element from JavaScript value : value to be returned when element is checked Note that there is no text associated with the checkbox— you have to supply text in the surrounding HTML

21 Drop-down menu or list A menu or list: red green blue Additional arguments: size : the number of items visible in the list (default is "1" ) multiple : if set to "true", any number of items may be selected (default is "false" )

22 Practice Exercise

23 A complete example Get Identity Who are you? Name: Gender: Male Female