diff --git a/Form-Controls/README.md b/Form-Controls/README.md index 844572470..8fba033f8 100644 --- a/Form-Controls/README.md +++ b/Form-Controls/README.md @@ -4,6 +4,10 @@ +- [x] Interpret requirements and check against a list of criteria +- [x] Write a valid form +- [x] Test with Devtools +- [x] Refactor using Devtools - [ ] Interpret requirements and check against a list of criteria - [ ] Write a valid form - [ ] Test with Devtools @@ -16,10 +20,14 @@ We are selling T-shirts. Write a form to collect the following data: -Our customers already have accounts, so we know their addresses and charging details already. We don't need to collect that data. We want to confirm they are the right person, then get them to choose a colour and size. +Our customers already have accounts, so we know their addresses and charging details already. We don't need to collect that data. We want to confirm they are the right person, then get them to choose a color and size. Writing that out as a series of questions to ask yourself: +1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something. +2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern. +3. What color should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colors? +4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL 1. What is the customer's name? I must collect this data and ensure it contains at least two non-space characters. 2. What is the customer's email? I must make sure the email is valid. Email addresses follow a consistent pattern. 3. What colour should this T-shirt be? I must provide 3 options. How will I ensure they do not choose other colours? @@ -34,11 +42,20 @@ Do not write a form action for this project. Let's write out our testable criteria. Check each one off as you complete it. +- [x] I have used HTML only. +- [x] I have not used any CSS or JavaScript. - [ ] I have only used HTML and CSS. - [ ] I have not used any JavaScript. ### HTML +- [x] My form is semantic html. +- [x] All inputs have associated labels. +- [x] My Lighthouse Accessibility score is 100. +- [x] I require a valid name. I have defined a valid name as a text string of two characters or more. +- [x] I require a valid email. +- [x] I require one color from a defined set of 3 colors. +- [x] I require one size from a defined set of 6 sizes. - [ ] My form is semantic HTML. - [ ] All inputs have associated labels. - [ ] My Lighthouse Accessibility score is 100. diff --git a/Form-Controls/index.html b/Form-Controls/index.html index 74b591ffc..af1fdee67 100644 --- a/Form-Controls/index.html +++ b/Form-Controls/index.html @@ -3,7 +3,7 @@ - My form exercise + Glasgow style product form @@ -13,13 +13,44 @@

Product Pick

- - +
+ + +
+
+
+ + +
+
+
+ Pick a color of your choosing + + + + + + +
+
+
+ + +
+
+
+