Web Forms. Survey or poll Contact us Sign up for an email newsletter Register for an event Submit comments or feedback about our site Log in to a members-only.

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

1 Introduction to HTML II อุทัย เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา.
Chapter 6 Basic forms 1. Forms and query string 2 form : a group of user input (UI) controls that accepts information from the user and sends the information.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
COS 125 DAY 23. Agenda Assignment 6 Corrected  5 A’s, 1 B, 1 C and 1 D  Problems with using CSS for layouts Assignment 7 is due today Assignment 7 Assignment.
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
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.
Using Entities & Creating Forms Jill R. Sommer Institute for Applied Linguistics Kent State University.
XHTML Forms for Data Collection and Submission Chapter 5.
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 –
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
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.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 07: Forms - Spring 2011.
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.
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?
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
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.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
 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.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 HTML Forms
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
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.
ITCS373: Internet Technology Lecture 5: More 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.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
1 HTML Forms
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
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.
Introduction To HTML Form Inputs Written By George Gimian.
Intro to Forms  HTML forms are used to gather information from end-users.  A form can contain elements like radio- buttons, text fields, checkboxes,
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 Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
COS 125 DAY 17. Agenda  Assignment 7 not finished grading  Assignment 8 posted Due April 9  Capstone progress reports due  Quiz 2 Corrected 2 A’s,
FORMS How to collect information f XX rom visitors Different kinds of form controls New HTML5 form controls.
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.
Tutorial 6 Creating a Web Form
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
Creating and Processing Web Forms
Web Forms.
Web Forms.
Objectives Design a form Create a form Create text fields
Validation and Building Small Apps
Designing Forms Lesson 10.
HTML Forms and User Input
Forms, cont’d.
Creating Forms on a Web Page
Web Forms.
Unit 5 Create Forms.
Presentation transcript:

Web Forms

Survey or poll Contact us Sign up for an newsletter Register for an event Submit comments or feedback about our site Log in to a members-only section of the site All our web pages thus far have had a one-way flow of information, from us to our web visitors. Now we'll see how our visitors can send information back to us via a web form. There are a number of reasons we might want our audience to fill out a form on our site: Once the information in a web form is submitted, a web server is required to process the information. That is an advanced topic, so we'll just focus on the designing of the web form, not the processing.

The Element To create a web form on a page, we use the opening and closing and tags: The method attribute determined in which format the submitted data will be sent. The two possible values are "post" and "get". All elements of the form must reside within the form element. As we have not added any elements to this example form yet, nothing would display on the page. The action attribute declares which file will receive and process the data once submitted. This will be a file written in a scripting language, such as PHP or ASP.

Text Box Let's begin adding some form elements. The most versatile component of a form is the element. Here we are adding two text fields: The type attribute determines which kind of input the field will be. A value of "text" creates a single-line text box with the size attribute determining the width in characters. We must define the name attribute and supply a unique value for each element of a web form that collects data from the user. This will be used later by the web server. First Name: Last Name:

Radio Buttons By changing the type attribute to "radio", we can create a set of options, of which the user can choose only one: Notice that each radio option has its own input element, with the identical name attribute. Only the value attribute differs. These are known as radio buttons because older cars used to have a set of buttons to press in for different radio stations. When a new button was pressed in, the old button would pop out. Eye Color: Brown Blue Green Other

Checkboxes Another possible type attribute is "checkbox", which differs from radio buttons in that none, some, or all of the options can be selected: Again, each checkbox option has its own separate input element. The matching name attribute is how we indicate that the options are part of the same list. My Pets: Dog Cat Hamster Fish If we had another set of checkboxes on the form, they would have a different name attribute value.

Drop-down List We can use the select and option elements together to create a drop- down list of options on our form: The name attribute is applied to the select element, not the individual option elements. Foreign Languages Spoken: Spanish French Japanese Arabic Drop-down lists are useful, as they can save us a lot of real estate on the screen, especially when there are a lot of options from which to choose.

Large Text Box If a single-line text box isn't big enough, we can use the textarea element to present a larger, expandable box that can hold a lot of text: The width and height of the box that displays on the web page is controlled by the rows and cols attributes, respectively. Tell us some more about yourself: Type here. Whatever text is placed between the opening and closing tags will display in the box itself when the page first loads. This could serve, for example, to provide the user with more instructions.

Preselecting Options Sometimes, we want to prefill or preselect form data for our visitors. We can do so by using these special attributes: First Name:... Brown... Dog Cat... French

Submit Button Once we've built all the fields for our web visitor to fill out, we need to provide them a way to submit their answers to us. We do this by including a button for them to click:... Whatever text we place in the value attribute will display on the button itself. Once the submit button is clicked, the page will gather all the data from the form and send it to the file indicated in the opening tag for processing.

Fieldset and Legend We can group form fields together and caption them using the and elements: Introduce Yourself... The fieldset will draw a line surrounding the form elements within it. Multiple fieldset and legend pairs can be used within a single form element. For example, they could be used to set apart and title different sections of the form. We can caption the group of form fields with whatever text we place within the opening and closing tags.

CSS Form Styling With a dash of CSS styling, we can make our form more presentable to our visitors: