33## Overview
44
55In this lab, you'll practice building forms in Sinatra by creating a basketball
6- team sign-up sheet. Your application will have a basic html form, and will
6+ team sign-up sheet. Your application will have a basic HTML form, and will
77display the data from the form after it has been submitted by the user.
88
99## Instructions
@@ -15,24 +15,26 @@ display the data from the form after it has been submitted by the user.
15153 . Make a form
1616
1717 Create a route that responds to a GET request at ` /newteam ` .
18- Add a form to the ` newteam.erb ` template and render it in the GET ` /newteam ` route.
18+ Add a form to the ` newteam.erb ` template and render it in the GET ` /newteam `
19+ route.
20+
1921 The form should have fields for:
20- Team name ('name')
21- Coach ('coach')
22- Point Guard ('pg')
23- Shooting Guard ('sg')
24- Power Forward ('pf')
25- Small Forward ('sf')
26- Center ('c')
22+ Team name ('name')
23+ Coach ('coach')
24+ Point Guard ('pg')
25+ Shooting Guard ('sg')
26+ Power Forward ('pf')
27+ Small Forward ('sf')
28+ Center ('c')
2729
28- It should look something like this:
30+ It should look something like this:
2931
30- ![ form for basketball team] ( https://curriculum-content.s3.amazonaws.com/web-development/Sinatra/basketball-form.png )
32+ ![ form for basketball team] ( https://curriculum-content.s3.amazonaws.com/web-development/Sinatra/basketball-form.png )
3133
32- When creating your form, your "Submit" button will need to be identified by
33- either an ` id ` attribute or a ` name ` attribute with value of "Submit". We're
34- telling this to you now because our test frame work, Capybara, requires buttons
35- to be [ findable either by an ` id ` or ` name ` attribute] [ capybara-click_button ] .
34+ When creating your form, your "Submit" button will need to be identified by an
35+ ` id ` attribute attribute with value of "Submit". We're telling this to you now
36+ because our test frame work, Capybara, requires buttons to be
37+ [ findable by an ` id ` , ` title ` , or ` value ` attribute] [ capybara-click_button ] .
3638
37394 . Handle form submission
3840
@@ -42,22 +44,23 @@ display the data from the form after it has been submitted by the user.
4244
43455 . Final Output
4446
45- Update the ` team.erb ` template so when you post to this form, it displays the name of the team and each member of the team.
47+ Update the ` team.erb ` template so when you post to this form, it displays
48+ the name of the team and each member of the team.
4649
4750 Your view should display something like this:
4851
4952 ![ completed form] ( https://curriculum-content.s3.amazonaws.com/web-development/Sinatra/basketball-results.png )
5053
51546 . Deliverables
5255
53- Pass the tests! Make sure you read the test output carefully!
56+ Pass the tests! Make sure you read the test output carefully!
5457
5558## Resources
5659
5760* [ Ashley William's GitHub] ( https://github.com/ashleygwilliams/ ) - [ Sinatra Form Party] ( https://github.com/ashleygwilliams/sinatra-form-party )
5861
5962* [ Ashley William's GitHub] ( https://github.com/ashleygwilliams/ ) - [ Citibike Sinatra] ( https://github.com/ashleygwilliams/citibike-sinatra )
6063
61- <p data-visibility =' hidden ' >View <a href =' https://learn.co/lessons/basic-sinatra-forms-lab ' title =' Sinatara Forms Lab ' >Sinatara Forms Lab</a > on Learn.co and start learning to code for free.</p >
62-
6364[ capybara-click_button ] : http://www.rubydoc.info/gems/capybara/Capybara%2FNode%2FActions%3Aclick_button
65+
66+ <p data-visibility =' hidden ' >View <a href =' https://learn.co/lessons/basic-sinatra-forms-lab ' title =' Sinatara Forms Lab ' >Sinatara Forms Lab</a > on Learn.co and start learning to code for free.</p >
0 commit comments