Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added README.md file #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Build an Interactive Form
================================

## Requirements

- [X] Set focus on the first text field. When the page loads, give focus to the first text field

- [X] Reveal a text field when the "Other" option is selected from the "Job Role" drop down menu. Make sure you add an text input field. Use the id of "other-title" for the field. Add placeholder text of "Your Title" for the field

- [X] For the T-Shirt color menu, only display the options that match the design selected in the "Design" menu.

- [X] If the user selects a workshop, don't allow selection of a workshop at the same date and time -- you should disable the checkbox and visually indicate that the workshop in the competing time slot isn't available.

- [X] When a user unchecks an activity, make sure that competing activities (if there are any) are no longer disabled.

- [X] As a user selects activities to register for, a running total is listed below the list of checkboxes. For example, if the user selects "Main conference" then Total: $200 should appear. If they add 1 workshop the total should change to Total: $300.

- [X] The "Credit Card" payment option should be selected by default and result in the display of the #credit-card div, and hide the "Paypal" and "Bitcoin information.

- [X] When a user selects the "PayPal" payment option, display the Paypal information, and hide the credit card information and the "Bitcoin" information.

- [X] When a user selects the "Bitcoin" payment option, display the Bitcoin information, and hide the credit card information.

- [X] Display error messages and don't let the user submit the form if any of these validation errors exist:
- Name field can't be empty
- Email field must be a validly formatted e-mail address (you don't have to check that it's a real e-mail address, just that it's formatted like one: dave@teamtreehouse.com for example. You'll need to use a regular expression to get this requirement. See the list of Resources for links to learn about regular expressions.
- At least one activity must be checked from the list under "Register for Actitivities."
- Payment option must be selected.
- If "Credit card" is the selected payment option, make sure the user supplied a credit card number, a zip code, and a 3 number CVV value.


## Extra Credit

- [X] Hide the "Color" label and select menu until a T-Shirt design is selected from the "Design" menu.

- [X] Style the "select" menus (drop down menus) on the form, so they match the styling of the text fields (see Resources links for an article on how to improve the look of select menus using CSS and JavaScript).

- [X] Validate the credit card number so that it's a validly formatted credit card number. (see the Resources links for information on how to do this.)