1 HTML Forms

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
Technologies for web publishing Ing. Václav Freylich Lecture 4.
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
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.
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.
Gathering Requirements What do users want?. Information Gathering Techniques Surveys Interviews Focus Groups.
Personal Independent Networking Project HTML Forms by Chris Smith.
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.
Session 2 Tables and forms in HTML Adapted by Sophie Peter from original document by Charlie Foulkes.
Creating Web Page Forms
ECA 228 Internet/Intranet Design I Forms. ECA 228 Internet/Intranet Design I Forms forms are a way for a user to communicate with you – text fields –
MS3304: Week 4 PHP & HTML Forms. Overview HTML Forms elements refresher Sending data to a script via an HTML form –The post vs. get methods –Name value.
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.
Web111a_chapt06.ppt HTML: Section 6 Forms HTML tags: define data input and/or output Define the Input and/or Output on the web page Do not process the.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 6: Creating Web Page Forms.
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.
Website Development with PHP and MySQL Saving Data.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
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.
TJ 3043 – Web Application Development HTML Form. 2.0 Forms A form is the usual way to communicate information from a Web browser to a server HTML has.
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.
Form Components and Elements
1 HTML Forms
1 HTML forms (cont.)
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
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.
Basic Webpage Design HTML Forms. Objectives Learn how to use HTML to create a form. Explain the concept of forms Know the difference of GET and POST Discuss.
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.
1 HTML forms (cont.)
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.
Informatics Computer School CS114 Web Publishing HTML Lesson 4.
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
ITE 115 Creating Web Page Forms
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

3 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 & cols - define the dimensions of the text box o rows - indicates the number of lines in the text box  default text can be specified in the text box when the form is initially displayed.

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

5 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

6 Creating form buttons  Form buttons can be clicked to 1. run programs (usually called push button) 2. submit forms (submit button) 3. reset the form to its original state (reset)

7 Creating push buttons  syntax for creating a push button  text is the text that appears on the button  push buttons perform no actions by themselves  need a script to associate an action with a push button

8 Creating submit/reset buttons  a submit button is a button that submits the form to a CGI script for processing  a reset button erases users ’ input and resets form to its original (default) values  the syntax for creating these two buttons is:  value attribute defines the text that appears on the button

9 Using name and value attributes  use name and value attributes when a form contains multiple buttons

10 Creating buttons using the tag  tag does not allow the Web page designer to control the appearance of a button  tag enables artistic control over the appearance of form buttons  The syntax of the tag is: button text and HTML tags o name attribute specifies the name of the button o value attribute sends to a CGI script o type attribute specifies the button type (submit, reset, or button)

11 Example the button type is a simple push button contents of the button button image The figure shows how to create a button that contains formatted text and an inline image. The default value for the type attribute is “button”. Within the tags you can place whatever HTML tags you wish to format the button’s appearance. This includes inline images. Go to the Home Page

12 How about some actions? Clicking on the button, I want to go to my homepage: Google.com Google Try some other web page!

13 Other button actions Reload the same page: Reload Go back one page: Back Go forward one page: Forward Close the window: Close

14 Different button styles Specifying width and heights of buttons: Google

15 Creating file buttons  a file button is used to select files  contents of the file are not displayed--only the file ’ s location is  syntax for creating a file button here, type attribute’s value is “file”

16 Using a file button, example 1. User clicks the Browse button 2. Selects a file from the Choose File dialog box 3. The filename and location are automatically placed in the text box The figure shows an example of using the file button to return the location of a file named “report.doc.”

17 Working with form attributes  attributes to the tag o specify where to send the form data o specify how to send  syntax o action specifies the filename and location of the CGI script that process the form o Can also specify address  o method specifies how your Web browser sends data to the CGI script

18 The method attribute  two possible values for the method attribute o get or post  get method (default value for method attribute) o packages the form data by appending it to the end of the URL specified in the action attribute o some Web servers limit the amount of data sent via get method and will cut off valuable information  post method o sends form data in a separate data stream, allowing the Web server to receive the data through what is called “ standard input ” o is preferred for sending data to a Web server o Web servers do not limit the amount of data sent via post method

19 Now we have learned all the form control elements! Let’s do a simple quiz!