freeCodeCamp/curriculum/challenges/english/01-responsive-web-design/responsive-web-design-projects/build-a-survey-form.english.md

61 lines
4.2 KiB
Markdown
Raw Normal View History

---
id: 587d78af367417b2b2512b03
title: Build a Survey Form
isRequired: true
challengeType: 3
---
## Description
<section id='description'>
<strong>Objective:</strong> Build a <a href='https://codepen.io' target='_blank'>CodePen.io</a> app that is functionally similar to this: <a href='https://codepen.io/freeCodeCamp/full/VPaoNP' target='_blank'>https://codepen.io/freeCodeCamp/full/VPaoNP</a>.
Fulfill the below <a href='https://en.wikipedia.org/wiki/User_story' target='_blank'>user stories</a> and get all of the tests to pass. Give it your own personal style.
You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!
<strong>User Story #1:</strong> I can see a title with <code>id="title"</code> in H1 sized text.
<strong>User Story #2:</strong> I can see a short explanation with <code>id="description"</code> in P sized text.
<strong>User Story #3:</strong> I can see a <code>form</code> with <code>id="survey-form"</code>.
<strong>User Story #4:</strong> Inside the form element, I am required to enter my name in a field with <code>id="name"</code>.
<strong>User Story #5:</strong> Inside the form element, I am required to enter an email in a field with <code>id="email"</code>.
<strong>User Story #6:</strong> If I enter an email that is not formatted correctly, I will see an HTML5 validation error.
<strong>User Story #7:</strong> Inside the form, I can enter a number in a field with <code>id="number"</code>.
<strong>User Story #8:</strong> If I enter non-numbers in the number input, I will see an HTML5 validation error.
<strong>User Story #9:</strong> If I enter numbers outside the range of the number input, which are defined by the <code>min</code> and <code>max</code> attributes, I will see an HTML5 validation error.
<strong>User Story #10:</strong> For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: <code>id="name-label"</code>, <code>id="email-label"</code>, and <code>id="number-label"</code>.
<strong>User Story #11:</strong> For the name, email, and number input fields, I can see placeholder text that gives me a description or instructions for each field.
<strong>User Story #12:</strong> Inside the form element, I can select an option from a dropdown that has a corresponding <code>id="dropdown"</code>.
<strong>User Story #13:</strong> Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the <code>name</code> attribute.
<strong>User Story #14:</strong> Inside the form element, I can select several fields from a series of checkboxes, each of which must have a <code>value</code> attribute.
<strong>User Story #15:</strong> Inside the form element, I am presented with a <code>textarea</code> at the end for additional comments.
<strong>User Story #16:</strong> Inside the form element, I am presented with a button with <code>id="submit"</code> to submit all my inputs.
You can build your project by forking <a href='http://codepen.io/freeCodeCamp/pen/MJjpwO' target='_blank'>this CodePen pen</a>. Or you can use this CDN link to run the tests in any environment you like: <code>https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js</code>
Once you're done, submit the URL to your working project with all its tests passing.
Remember to use the <a href='https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> method if you get stuck.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests: []
```
</section>
## Challenge Seed
<section id='challengeSeed'>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>