-
-
Notifications
You must be signed in to change notification settings - Fork 428
Glasgow | ITP-Jan-2026 | Alasdair MacDonald | Sprint 2 | Form Control #1073
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,46 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <title>My form exercise</title> | ||
| <meta name="description" content="" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Product Pick</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
|
|
||
| <body> | ||
| <header> | ||
| <h1>Product Pick</h1> | ||
| </header> | ||
| <main> | ||
| <form> | ||
| <!-- write your html here--> | ||
| <!-- | ||
| try writing out the requirements first as comments | ||
| this will also help you fill in your PR message later--> | ||
| <h1>Product Pick</h1> | ||
|
|
||
| <form action="result.html" method="GET"> | ||
| <fieldset> | ||
| <legend>Choose your T-shirt</legend> | ||
|
|
||
| <label for="name">Name:</label> | ||
| <input type="text" id="name" name="name" required /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you find another way to make sure that the name is a valid name? |
||
|
|
||
| <label for="colour">Colour:</label> | ||
| <select id="colour" name="colour" required> | ||
| <option value="">Select a colour</option> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <option value="Black">Black</option> | ||
| <option value="White">White</option> | ||
| <option value="Blue">Blue</option> | ||
| </select> | ||
|
|
||
| <label for="size">Size:</label> | ||
| <select id="size" name="size" required> | ||
| <option value="">Select a size</option> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <option value="Small">Small</option> | ||
| <option value="Medium">Medium</option> | ||
| <option value="Large">Large</option> | ||
| </select> | ||
|
|
||
| <button type="submit">Submit</button> | ||
| </fieldset> | ||
| </form> | ||
| </main> | ||
|
|
||
| <footer> | ||
| <!-- change to your name--> | ||
| <h2>By HOMEWORK SOLUTION</h2> | ||
| <h2>By Alasdair MacDonald</h2> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Form Result</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| </head> | ||
|
|
||
| <body> | ||
| <main> | ||
| <h1>Your Selection</h1> | ||
|
|
||
| <p><strong>Name:</strong> <span id="name"></span></p> | ||
| <p><strong>Colour:</strong> <span id="colour"></span></p> | ||
| <p><strong>Size:</strong> <span id="size"></span></p> | ||
|
|
||
| <a href="index.html">Go back</a> | ||
| </main> | ||
|
|
||
| <script> | ||
| const params = new URLSearchParams(window.location.search); | ||
| document.getElementById("name").textContent = params.get("name"); | ||
| document.getElementById("colour").textContent = params.get("colour"); | ||
| document.getElementById("size").textContent = params.get("size"); | ||
| </script> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to ask the customer for their email, please go through the task requirements