Difference between revisions of "WebFund 2015W: Assignment 2"

From Soma-notes
Jump to navigation Jump to search
Line 8: Line 8:
# [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen.  Note that this should be a link (a tag)!
# [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen.  Note that this should be a link (a tag)!
# [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
# [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
# [4] Implement a simple query interface that searches the previous records for any containing partial matches to any of the filled in fields. The button at the bottom should say "Query" and should cause a new query screen to be loaded. This new screen, once submitted, should return a listing screen (based on the original listing one) that lists only the selected records.
# [4] Implement a simple query interface that searches previous records for any record containing partial matches to the query in any of the filled in fields. This interface should:
#* be a new screen accessible from the main page (/) from a button whose text says "Query"
#* be located at a route named /query
#* contain a form with a single text input whose name attribute is "input" and a single submit button whose action is "/doquery" using a POST request.
#* once submitted, return a listing screen (based on the already existing /list screen) that lists only the records which contain, in one or more of its fields, the input string as a substring.
 
For example, if the user inputs the string "test" and hits submit, the list screen should have all records which have "test" somewhere in one of its fields.

Revision as of 10:18, 20 January 2015

This assignment is not yet finalized

In addition to the points below, you also get up to 2 points for overall programming style. In total, there are 10 points. The questions below will be automatically graded for everything but style. Further details on how to structure your output will be added here soon.

The following questions require you to modify the form-demo code from Tutorial 2.

  1. [1] Make the application listen on port 3200 by default.
  2. [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen. Note that this should be a link (a tag)!
  3. [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
  4. [4] Implement a simple query interface that searches previous records for any record containing partial matches to the query in any of the filled in fields. This interface should:
    • be a new screen accessible from the main page (/) from a button whose text says "Query"
    • be located at a route named /query
    • contain a form with a single text input whose name attribute is "input" and a single submit button whose action is "/doquery" using a POST request.
    • once submitted, return a listing screen (based on the already existing /list screen) that lists only the records which contain, in one or more of its fields, the input string as a substring.

For example, if the user inputs the string "test" and hits submit, the list screen should have all records which have "test" somewhere in one of its fields.