Web Technologies Lecture 3 Web forms. HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls.

Slides:



Advertisements
Similar presentations
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
Advertisements

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.
Tutorial 6 Creating a Web Form
Ch3: Introduction to HTML5 part 2 Dr. Abdullah Almutairi ISC 340 Fall 2014.
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
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.
Video, audio, embed, iframe, HTML Form
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Tutorial 6 Working with Web Forms
USER INTERACTIONS: FORMS
Using Entities & Creating Forms Jill R. Sommer Institute for Applied Linguistics Kent State University.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements.
HTML F ORMS. F ORMS HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons,
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Forms, Validation Week 7 INFM 603. Announcements Try placing today’s example in htdocs (XAMPP). This will allow you to execute examples that rely on PHP.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
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.
HTML 5 Tutorial Chapter 9 Form Attributes. New Form Attributes HTML5 has several new elements and attributes for forms. New form attributes : autocomplete.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 07: Forms - Spring 2011.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
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.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
Neal Stublen Improvements  New form elements  Assist with validation  Consistency across sites  Changes reduce the need for common.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
HTML. Basic HTML HTML document – HTML headings – to HTML paragraphs – HTML links – HTML images –
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
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.
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.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements  Always name.
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.
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.
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.
TJ 3043 – Web Application Development HTML Form. 2.0 Forms - A form is the usual way information is gotten from a browser to a server - HTML has tags.
HTML Forms Forms, Controls, Fields, Inputs, Submission, Validation SoftUni Team Technical Trainers Software University
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 Web Engineering Forms Lecture 05. FORMS Its how HTML does interactivity. There are quite new feature in HTML5. But the fundamental idea does not change.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
CIS 228 The Internet 12/6/11 Forms and Validation.
Tutorial 6 Creating a Web Form
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
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.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
TNPW1 Ing. Jiří Štěpánek.  ordered list  (list item)  unordered list  (list item)
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
HTML CS422 Dick Steflik.
Introducing Forms.
Objectives Explore web forms Work with form servers
Web Systems Development (CSC-215)
Forms, cont’d.
HTML5 - 2 Forms, Frames, Graphics.
Presentation transcript:

Web Technologies Lecture 3 Web forms

HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls – Color pickers User interacts with the form providing data which is sent to the server for further processing – E.g.: returning results of a search or calculation

Web Forms 2.0 If a pattern is popular enough migrate it from a scripted solution to a more declarative form Example – The :hover peusdo-class in CSS CSS has limitations HTML5 introduces many new form enhancements Features were part of the WHATWG specification called Web Forms 2.0 now part of HTML5

The tag <form method= "get" enctype="application/x-www-form-urlencoded" action=" Placed inside the tag Required attributes – method Get (for querying data) or post (for sending data, e.g., a file) – action URL of the service handling the submitted data Optional enctype application/x-www-form-urlencoded (default) – All characters encoded before being sent (e.g., spaces are converted to + characters and special characters to ASCII HEX) » &  &#X26 (&), “  &#x22 (") multipart/form-data – No characters are encoded – Used for file uploads text/plain – Spaces are encoded, special characters not

Form content Contains controls – Many are represented by elements Controls are labeled with the tag Each part of a form is considered a paragraph and is separated by the rest by using elements Number of requested integers:

Input types Specified via the type attribute hidden (HTML 4) text (HTML 4) search tel url password (HTML 4) datetime date month week time datetime-local number range color checkbox (HTML 4) radio (HTML 4) file submit (HTML 4) image reset (HTML 4) button (HTML 4)

Browser compatibility Not all browsers support all input types Check compatibility at The browser will only retain the type value you set if it supports that input type Otherwise, it will ignore the value you set and leave the type property as "text“ – In this case, javascript handling of the value is required

Input restrictions

Other form controls tag – Specifies a multi-row text field At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies. – Allows to setup a dropdown list with options Volvo Saab Opel Audi

New HTML5 attributes Placeholder – When no input is entered display default text – Grayed – Disappears when clicked on the input Autofocus – Focus on a particular form field Required – Marks a field as required – Requires javascript to check for its existence Autocomplete – Lets forms forget about auto-filling a field – Good in cases where you do not want other users to see some of your input such as bank accounts, etc.

Listing predefined options tag – crossbreed between and

Going into the future Browser vendors competing on the prettiness and usability of their HTML5 form controls – Should web developers style them instead? – Already some controls such as calendars and sliders cannot be styled using CSS

Data requests Get – Requests data from a specified resource – The query string is sent in the URL of the request e=10&format=plain&rnd=new – Used by the REST (REpresentational State Transfer) architecture Post – Submits data to be processed to a specified resource – The query string is sent in the HTTP body of the request POST /test/demo_form.asp HTTP/1.1 Host: w3schools.com name1=value1&name2=value2

Get GET requests can be cached GET requests remain in the browser history GET requests can be bookmarked GET requests should never be used when dealing with sensitive data GET requests have length restrictions – Depends on implementation GET requests should be used only to retrieve data

Post POST requests are never cached POST requests do not remain in the browser history POST requests cannot be bookmarked POST requests have no restrictions on data length

Get vs. post

What’s next? XML & XHTML Javascript – State vs. stateless Dynamic HTML manipulation AJAX – Synchronous vs. asynchronous JQUERY Server side programming