Multipage Forms

100 points

Multipage Forms

Requirements

Required controller and actions created10
Routes created allowing all actions and views to be accessed10
Required forms have been created20
Form fields are of a most appropriate type20
All data is maintained and displayed on final page30
Appropriate and meaningful tests written and passing10
Total100 pts

Resources

Objective

To practice with passing and receiving values, and form helpers

Instructions

Setup

For this lab you will need to create a 4 page web application where values are gathered from the user on the first 3 pages and are then all displayed on the 4th page. The first three pages should be reachable through the paths:

/people/form1
/people/form2
/people/form3

and the 4th page should be located at:
/people/display

You will need to create the appropriate routes, controller, actions, and associated views to allow for these pages and paths to exist and be accessible.

Forms

The first three pages should each contain a form created by using rails' form helper methods.

The first page should contains fields for collecting a users first and last names.

The second page should contain fields for collecting a users street address, city, state, and zip code.

The third page should collect billing information in the form of a credit card type, a credit card number, and a expiration month and year.

In all cases a most appropriate form control should be used to collect each piece of data.

Behavior

We will always expect a user to begin at the page called form1. When the user submits the form on the form1 page they should then be taken to the form2 page where they can complete that form. When form2 is submitted the user should be taken to form3 and when that form is submitted the user should be taken to the display page. At each step in the process of moving from one form page to another a way will need to be invented to maintain previous data that was entered. For example, after the user has entered their first and last names on form1 and moved on to form2, the application will still need to remember the first and last names that were entered on the previous page. This will culminate in having all of the information that was entered through all of the forms displayed when the user reaches the display page.

Tests

Test will need to be written to test and confirm the operation of all actions in your controller and the output of the views. I would expect to see no less than 4 tests containing a combined 15 assertions.