Today - Forms! WD 2.7 - Students produce a basic HTML/XHTML document using forms. Find the group that best matches the part of the project you are going.

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.
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.
Principles of Web Design 6 th Edition Chapter 11 – Web Forms.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
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 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?
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
INTRODUCTORY Tutorial 8 Creating Forms. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Create an HTML form Create fields for text Create.
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.
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.
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.
SYST Web Technologies SYST Web Technologies XHTML Forms.
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.
1 HTML forms (cont.)
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.
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.
1 HTML forms (cont.)
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
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
Tutorial 6 - Creating Web Page Forms
How to Write Web Forms By Mimi Opkins.
Web Development & Design Foundations with HTML5 8th Edition
HTML Forms Pat Morin COMP 2405.
(and available form fields)
ITE 115 Creating Web Page Forms
ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms)
New Perspectives on Creating Web Pages with HTML
Designing Forms Lesson 10.
Objectives Explore web forms Work with form servers
Creating Form Elements
Web Development & Design Foundations with H T M L 5
CNIT 131 HTML5 - Forms.
Web Development & Design Foundations with H T M L 5
Principles of Web Design 5th Edition
Creating Forms on a Web Page
Lesson 6: Web Forms.
Chapter 6: Creating Web Page Forms. An Example of a Form.
HTML Forms
Unit 5 Create Forms.
Presentation transcript:

Today - Forms! WD 2.7 - Students produce a basic HTML/XHTML document using forms. Find the group that best matches the part of the project you are going to work on for forms: You will need a piece of paper and a pencil/pen

Chapter 6 – Web Page Forms

Forms HTML controls how the form looks, it does not do the processing of the form…that is done by the server which is usually coded in: CGI Scripts (Common Gateway Interface) ASP C/C++ PHP Visual Basic We are just building the FORM, not coding the Server

Form Items Control Elements – different parts of form such as input boxes, buttons, text areas Field – where the user can enter information Field Value – the information that is entered Form Label – label around the field that is what the user sees… “First Name”…”Item Purchased”

Form Element Setting up the form <form name = “name” > <!—all of the code for your form goes here-> </form>

Input Boxes When data is sent to server it is sent as a name/value pair – name of field is paired with data the user entered <input type = “text” name=“name” /> size = “value” ----changes the width of the box on screen maxlength = “value” ----maximum length of characters user may enter in a text box value=“value” ----default value in text box

First Name <input type = “text” name=“fname” size=“30” />

Shows as * on screen, not secure Password Input Boxes Shows as * on screen, not secure <input type=“password”> ********

Selection Lists <select name=“name”> <option>first list item</option> <option>second list item</option> </select> If you want things to be in a group you… <optgroup label=“Name of Group”> <option>…</option> </optgroup>

<label for=“ordertype”>Order Type</label> <select name=“ordertype”> <option value=“carryout”>Carry Out</option> <option value=“delivery”>Delivery</option> <option value=“dinein”>Dine In</option> <option value=“take”>Take and Bake</option>

Items you can add to Selection Lists: optgroup --- allows you to group things in your Selection List size=“value” ---- changes # of items displayed in a box at a time multiple=“multiple” ---- user can select more than 1 value selected = “selected” ----default selection

Option Buttons / Radio Buttons Can only select 1 item from the list Same names, different ids and values! <fieldset> <legend>…..what goes around option buttons</legend> <input type=“radio” name=“name” value=“uniqueID”> Label <input type=“radio” name=“name” value=“uniqueID”> Label #2 </fieldset>

<label>Was your service friendly</label> <fieldset> <label for=“sYes”>Yes</label> <input type=“radio” name=“service” value=“yes”> <label for=“sNo”>No</label> <input type=“radio” name=“service” value=“no”> Value sent to server

Check Boxes Can select multiple values, not just 1 like in radio buttons <fieldset class="optionGroup"> <legend>How did you hear about us? (check all that apply)</legend> <input type="checkbox" name="radio" value="yes"/>Radio <input type="checkbox" name="tv" value="yes"/>TV <input type="checkbox" name="friend" value="yes"/>Friend </fieldset> Can add checked=“checked” to have a checked selection

Text Area Box <textarea name=“name” rows = “#” cols=“#”> text to show up as default </textarea>

Buttons Types of buttons Submit Button – submits a form to the server <input type = “submit” value=“Send Registration” /> Reset Button – resets the form to the default values <input type=“reset” value=“Cancel” /> Command Buttons – if you write script to do something when clicked, it doesn’t do anything on its own <input type=“button” value=“text to be displayed” />

Custom Buttons </button> Adding labels, pictures…. <button name=“name” value=“value” type=“type”> <img src=“….” /> Text </button> reset, submit, or button

File Buttons <input type=“file” name=“file_name” /> …the Browse button in a web page Browse

Form Attributes In Form Elements…. ….. methods: <form action =“url” method=“type” enctype=“type”> ….. </form> methods: get = default, appends the form data to the end of the URL specified in the action attribute post = sends form data in a separate data stream, most people use this method

Form Attributes <form action =“url” method=“type” enctype=“type”> …..</form> Enctype options: application/x-www-form-urlencoded the default format…data is transferred as a long text string and spaces and non-text characters are encoded multipart/form-data – used when sending files to a server, spaces and non-text characters are preserved text/plain – data is transferred as plain text with no encoding of spaces or non-text characters

Mailto Action If you want to send the information through an email and not to a server use: <form action=“mailto:email_address” method=“post” enctype=“text/plain”> </form>

Tab Order and Access Keys Tab Order – when you press tab, what order do you go in… <input name=“fname” tabindex=“2” /> if negative or 0 omitted from tab order Access Key – used with Alt to get to boxes quickly <inut name=“lname” accesskey=“l” />