Created
December 8, 2018 04:24
-
-
Save morganda/005858653b60cc8fd027318e78c88f3a to your computer and use it in GitHub Desktop.
Build a Survey Form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<header> | |
<h1 id="title">Survey Form</h1> | |
</header> | |
<div id="survey-form-div"> | |
<div id="form-description"> | |
<p id="description">Let us know how we can improve freeCodeCamp</p> | |
</div> | |
<form id="survey-form"> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label for="name" id="name-label">Name:</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<input type="text" id="name" required placeholder="enter your name"/> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label for="email" id="email-label">Email:</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<input type="email" id="email" required placeholder="enter your email"/> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label for="number" id="number-label">Number:</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<input type="number" id="number" min="0" max="10" placeholder="number between 0-10"/> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label>Which option best describes your current role?</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<select id="dropdown"> | |
<option>student</option> | |
<option>part-time employed</option> | |
<option>full-time employed</option> | |
<option>self-imployed</option> | |
<option>unemployed</option> | |
</select> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label>How likely is that you would recommend freeCodeCamp to a friend?</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<ul> | |
<li><label><input type="radio" name="radio-buttons" value="1">Definitely</label></li> | |
<li><label><input type="radio" name="radio-buttons" value="2">Maybe</label></li> | |
<li><label><input type="radio" name="radio-buttons" value="3">Not Sure</label></li> | |
</ul> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<lablel>Things that should be improved in the future:</label> | |
</div> | |
<div class="survey-form-input-div" id="survey-form-improvement-input"> | |
<ul> | |
<li><label><input type="checkbox" name="checkboxes" value="1">Front-end projects</label></li> | |
<li><label><input type="checkbox" name="checkboxes" value="2">Back-end Projects</label></li> | |
<li><label><input type="checkbox" name="checkboxes" value="3">Data Visualization</label></li> | |
<li> <label><input type="checkbox" name="checkboxes" value="4">Challenges</label></li> | |
</ul> | |
</div> | |
</div> | |
<div class="form-row"> | |
<div class="survey-form-input-label-div"> | |
<label>Any Comments or Suggestsions?</label> | |
</div> | |
<div class="survey-form-input-div"> | |
<textarea></textarea> | |
</div> | |
</div> | |
<div class="form-row"> | |
<input type="submit" value="Submit" id="submit"> | |
</div> | |
</form> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// !! IMPORTANT README: | |
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. | |
/*********** | |
INSTRUCTIONS: | |
- Select the project you would | |
like to complete from the dropdown | |
menu. | |
- Click the "RUN TESTS" button to | |
run the tests against the blank | |
pen. | |
- Click the "TESTS" button to see | |
the individual test cases. | |
(should all be failing at first) | |
- Start coding! As you fulfill each | |
test case, you will see them go | |
from red to green. | |
- As you start to build out your | |
project, when tests are failing, | |
you should get helpful errors | |
along the way! | |
************/ | |
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example! | |
// Once you have read the above messages, you can delete all comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
font-family: 'Raleway', Helvetica, sans-serif; | |
margin: 0px auto 0px auto; | |
padding-right: 25px; | |
background-color: #AADDFF; | |
} | |
header { | |
margin-left: auto; | |
margin-right: auto; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
} | |
#form-description { | |
margin: 0px auto 0px auto; | |
padding-top: 10px; | |
padding-left: 10px; | |
padding-bottom: 5px; | |
} | |
#description { | |
margin: 10px auto 15px auto; | |
display: flex; | |
justify-content: center; | |
} | |
#survey-form-div { | |
margin: 0px auto 0px auto; | |
width: 75%; | |
background-color: #EEEEFF; | |
border-radius: 10px; | |
padding-bottom: 15px; | |
} | |
.form-row { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
margin-top: 10px; | |
width: 50%; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.survey-form-input-label-div { | |
margin-right: auto; | |
width: 100%; | |
} | |
.survey-form-input-div { | |
margin-right: auto; | |
} | |
.survey-form-input-div > ul { | |
list-style-type: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment