FORMS Lesson 10 Unit J Why Forms? Free-form – input that is unstructured and does not limit choices. For example, lets say you ask clients to .

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

Tutorial 6 Creating a Web Form
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
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.
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.
XHTML Forms for Data Collection and Submission Chapter 5.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
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.
HTML Forms What is a form.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
LESSON 10 UNIT K FORMS. WHY FORMS? Free-form – input that is unstructured and does not limit choices. For example, lets say you ask clients to .
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.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
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.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
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.
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.
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
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.
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.
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.
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
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.
1 Committed to Shaping the Next Generation of IT Experts. 03: Links and Forms HTML.
1 HTML Forms
USABLEANDACCESSIBLEFORMS. accessibility or Accessibility?
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.
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,
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Informatics Computer School CS114 Web Publishing HTML Lesson 4.
Tutorial 6 Working with Web Forms
Creating and Processing Web Forms
Web Development Part 2.
Client-Side Internet and Web Programming
How to Write Web Forms By Mimi Opkins.
Objectives Design a form Create a form Create text fields
CS3220 Web and Internet Programming HTML Tables and Forms
HTML Forms Pat Morin COMP 2405.
FORMS IN HTML.
>> More on HTML Forms
FORMS Explained By: Sarbjit Kaur.
Retrieving information from forms
Building Configurable Forms
Validation and Building Small Apps
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Designing Forms Lesson 10.
Web Systems Development (CSC-215)
Web Development & Design Foundations with H T M L 5
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
Forms, cont’d.
CS3220 Web and Internet Programming HTML Tables and Forms
Creating Forms on a Web Page
Basics of Web Design Chapter 10 Form Basics Key Concepts
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
© Hugh McCabe 2000 Web Authoring Lecture 8
HTML5 - 2 Forms, Frames, Graphics.
HTML Forms
Presentation transcript:

FORMS Lesson 10 Unit J

Why Forms? Free-form – input that is unstructured and does not limit choices. For example, lets say you ask clients to e-mail you the information about your pet so that your can book the pet a spot in the kennel. E-mail number 1 - Bowser is our new puppy. Bowser is brown and white. Bowser will be staying 3 days next week. E-mail number 2 - Bubba is our family dog. Bubba is a very gentle 5 year old terrier. Lately Bubba has had some medical problems but it should not be a problem during the stay on the upcoming holiday weekend. Do you know the gender, type of animal, status of shots or even exactly which days and nights the animal will be at the kennel?

Forms provide structured input.

What are the ADVANTAGES of using forms? User does the work Can require information Can limit choices Can validate input Can give default values Can put information into discrete pieces – “chunks” 2201989 Birthdate 02 20 1989 Better 6025551234 Phone number 602 555 1234 Better PatJones Pat Jones

Which IS Better? Which is better a persons age or their date of birth? ANSWER: Date of birth because it does not change and age can be calculated. Derived data - data value can be computed based upon other data.

Derive or update each visit? Dog’s weight? ANSWER: Enter each visit Dog’s shots? ANSWER: Enter each visit – law requires that they are current in their shots.

Where to start? What is the purpose of the form? How will the information be used? What type of data? Yes/no, numbers to what decimal, abbreviations, codes How discreet? First name, initial, last name Break down into multiple has advantages and disadvantages. Talk to the users if possible.

Where to start? Design on paper first. Put a title on the form Place a unique identifier of the form (usually in top right corner or in the footer). Provide instructions and explanations. Every input should have a label.

Where to start? Put related fields together. Order should be what users expect. Logical flow left  right top V bottom Place a field for questions or comments at the bottom of the form.

Form Essentials Define the form with form tags <form> </form> Your entire form MUST be within the form tags! Add input controls – they all must be within the form tags. Add action buttons – at bottom of form before the end form tag.

Without css

With css

Fieldset: group of fields that forms a logical unit Label: element containing descriptive text that is associated with a field Associate each field with a label to make the significance of the field clear to users Fieldset: group of fields that forms a logical unit Legend: a descriptive title for a fieldset Add legends to fieldsets to further increase usability of the form

How many fieldsets in the following code? Within contactinfo, what is the first legend and what is the first label?

Input Controls - TEXTFIELD Type is text for the first input, type is email for the second input name= is crucial for input id= is crucial for css Placeholder gives direction

Input from a FORM What is submit is the name attribute of a field with the associated value.

How does a TEXTFIELD get its size? In the css file #nameinput, #emailinput {width: 30em; maxlength: 60} #phoneinput {width: 12em; }

Input Controls - CHECKBOXES Why is value crucial?

Input Controls – OPTION BUTTONS In order for buttons to work, each group MUST use the same value for name. Checked indicates the default.

Suppose you wanted to know what county they live in. How many counties in Arizona? 15 Which state has the fewest counties? Alaska has 8 and Hawaii has only 5 But the trick answer is Louisiana has zero counties and 64 parishes Which state has the most counties? Texas has 254 Use Drop down menu for a selection of one from many. Limits choices and controls input.

Suppose you wanted to know what county they live in.

Input Controls provide a variety of input techniques.

ADDITIONAL INPUTS Textarea – multi-column text area.

ADDITION ITEMS

ADDITION ITEM Requiring input. New attribute in HTML5 Can be done with a script – javascript. <legend><span>Contact Information</span></legend> <label>Name <input type="text" name="name" id="nameinput" required="required" placeholder="First and last name" /> </label>

EVEN MORE ADDITIONAL ITEMS

ACTION BUTTONS <fieldset id="submitbutton"> <input type="submit" id="submit" value=“Submit" /> </fieldset>

TEXT on THE ACTION BUTTON <fieldset id="submitbutton"> <input type="submit" id="submit" value=“Submit my information" /> </fieldset>

MORE ABOUT BUTTONS On the begin form tag you can indicate an action and a method for how the form is submitted.

Submit button “action” attribute used to specify name and location of script that will accept form data “method” attribute used to indicate how data should be submitted On the form tag you might have: <form action=“my_form.asp" method="get"> or <form method="post" action="http://www.sample.com/cgi-bin/formmail.cgi">

Figure J-19: HTML code for form action and submit button Figure J-22: results.html page showing submitted form data