Forms Carol Wolf Computer Science. The Controller  To create a controller, type  rails generate controller pizza index order  This creates a controller.

Slides:



Advertisements
Similar presentations
JSP -exercises- Alessandro Marchetto Fondazione Bruno Kessler-IRST, Centro per la Ricerca Scientifica e Tecnologica.
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.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
1 HTML in 21 minutes A legal HTML document ( html/legalt.html ): My Site My Site See the page Web Publishing with Databases It can be difficult to format.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
How to Make a Web Page: A Crash Course in HTML programming.
Forms cs105. More Interactive web-pages So far what we have seen was to present the information. (Ex: tables. Lists,….). But it is not enough. We want.
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.
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 Forms Section A - Working with Forms in JavaScript.
Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),
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 –
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
ITM © Port, Kazman1 ITM 352 HTML Forms, Basic Form Processing.
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.
Lecture 6 – Form processing (Part 1) SFDV3011 – Advanced Web Development 1.
WEB FORM DESIGN. Creating forms for a web page For your web project you have to design a form for inclusion on your web site (the form information should.
07/30/ ODE, Office for Child Nutrition Viewing Orders.
Creating a Web Site to Gather Data and Conduct Research.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Views Carol Wolf Computer Science. Extended Ruby  Views files are written in extended Ruby, erb.  They end in.html.erb.  Ruby code is intermixed with.
Web Design ATBs. ATB #1 List headings and size ATB #2 Define HTML.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
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.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
HTML and FORMS.  A form is an area that can contain form elements.  Form elements are elements that allow the user to enter information (like text fields,
HTML Form and PHP IST Review of Previous Class HTML table and PHP array Winner is chosen randomly using rand() function.
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: CREATING A WEB FORM Session OBJECTIVES Create a text area Create a selection list Create option buttons Create check boxes.
1 PROJECT 4 WEB/HTML CUSTOMER SATISFACTION FORM Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
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.
Create, Update and Delete Carol Wolf Computer Science.
Intro to Forms  HTML forms are used to gather information from end-users.  A form can contain elements like radio- buttons, text fields, checkboxes,
Form Components and Elements
Lecy ∙ Data-Driven Management Lecture 12 Building Shiny Apps.
WEB FORM DESIGN. Creating forms for a web page For your web project you have to design a form for inclusion on your web site (the form information should.
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.
Unit 2 — The Exciting World of JavaScript Lesson 7 — Creating Forms with JavaScript.
OCR Nationals ICT – Unit 2 Task 4 Task Overview In this task you will create hyperlinks to link the pages together, link to other websites on the Internet.
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.
TIU Note Templates. Learning Objectives Discuss Human Factor Internationals (HFIs) recommendations for Text Integration Utility (TIU) Templates Become.
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
LOGIN PAGE Login Page Support CRM:
The Controller Carol Wolf Computer Science. Rails generate commands  Using the generate command, you can create a number of useful objects.  Rails:
Revolution Prep Directions: Look at your Practice ACT answer sheet. Follow the directions below. 1.Write this website on the top of your answer sheet:
HTML FORM AND PHP IST 210: Organization of Data IST210 1.
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.
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.
Routes Carol Wolf Computer Science. RESTful Architecture  Rails uses REST-style architecture: representation state transfer  resources :courses in routes.rb.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Creating and Processing Web Forms
Objectives Design a form Create a form Create text fields
Using the HTML and CSS Validation Services
SUBMITTING A PAYMENT REQUEST FORM
JavaScript Arrays Date
Introducing Forms.
1.5 FORMS.
HTML Forms and User Input
Web Systems Development (CSC-215)
How to Submit Google Docs to the Homework Drop Box
EBSCOhost Advanced Search Guided Style
Presentation transcript:

Forms Carol Wolf Computer Science

The Controller  To create a controller, type  rails generate controller pizza index order  This creates a controller called pizza_controller.rb.  Two routes in routes.rb:  “get pizza/index” and  “get pizza/order”.  The second one will have to be changed to a post.  “post pizza/order”  Two ERB files in views/pizza  index.html.erb  order.html.erb

Example: Pizzeria  An order form for pizza will be used as an example to show different kinds of buttons.  radio buttons  select drop-down boxes  check boxes  date and time boxes  text areas  text fields  Each will have a place in the form on the index page, code in the controller to access the data and an output section on the response page, order.html.erb.

The Basic Form  The basic form has a name and action. The method is determined by the corresponding route in routes.rb.  It has a number of places for inputting data and a submit button.  The following comes from a pizzeria example. {:action => :order} do |form| %> …

The index page

Radio Buttons  Radio buttons are used when only one answer may be given.  The erb code in the index file: :  The controller code that receives the =  The output code on the response page: The crust is.

Select Drop-down Boxes  The index page code: : "small", :Large => "large"} %>  The controller  The response page code: The size is.  The name of the parameter is size.  The values that will be stored in the drop down box are listed in a hash. The one selected will be sent in the parameters hash.

Check Boxes – Index page code  Check boxes allow the user to make several choices. :

Check Boxes – Controller = Array.new == << "Mushrooms" end == << "Pepperoni" end == << "Vegetables" end

Check Boxes – Response page code The toppings you chose are:

Date and Time Boxes  The date and time boxes provide drop-down boxes with all the months, about 10 years, 31 days, 24 hours and 60 minutes.  Index file code: :  Controller = = = =  Response page code: The delivery date is / /, and the delivery time is :.

Text areas  Text areas are used to collect a section of text. They are sent to the controller as a string with lines separated by “\r\n”.  The index code: 'float: left' %> 3, :cols => 40 %>  The controller  The response page code: The address is.

Text Fields  Text fields are probably used the most. The consist of a single box where users can type in data.  The index page code:  The controller  The response page code: The telephone number is.  Link to return to index page:

The Response Page – order.html.erb