A Pen by Bianca O. Uche on CodePen.
Created
February 12, 2022 09:39
-
-
Save Erudite885/aa2aa939d0bab4aeb9e65ce09c7d95cb to your computer and use it in GitHub Desktop.
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
<div class="main"> | |
<header class="header"> | |
<!--Title with class id--> | |
<h1 id="title" class="text-center">CodyCamper Survey Form</h1> | |
<p id="description" class="description text-center"> | |
Thank you for helping us improve. | |
</p> | |
</header> | |
<!--Checklist form with class id--> | |
<form id="survey-form"> | |
<div class="form-group"> | |
<label | |
id="name-label" | |
for="name">Name: | |
</label> | |
<input | |
type="text" | |
name="name" | |
id="name" | |
class="form-control" placeholder="Enter your name" required /> | |
</div> | |
<div class="form-group"> | |
<label id="email-label" for="email">Email:</label> | |
<input | |
type="email" | |
name="email" | |
id="email" | |
class="form-control" placeholder="Enter your Email" required /> | |
</div> | |
<div class="form-group"> | |
<label id="number-label" for="number">Age<span class="clue"> (optional):</span></label> | |
<input | |
type="number" | |
name="age" | |
id="number" | |
min="15" max="50" | |
class="form-control" | |
placeholder="Age"/> | |
</div> | |
<!--Code for dropdown selection--> | |
<div class="form-group"> | |
<p>Which option best describes your current role?</p> | |
<select id="dropdown" name="role" class="form-control" required> | |
<option disabled selected value>Select current role</option> | |
<option value="student">Student</option> | |
<option value="job">Full Time Job</option> | |
<option value="learner">Full Time Learner</option> | |
<option value="preferNo">Prefer not to say</option> | |
<option value="other">Other</option> | |
</select> | |
</div> | |
<!--Code for radio button--> | |
<div class="form-group"> | |
<p>Would you recommend CodyCamper to a friend?</p> | |
<label> | |
<input | |
name="user-recommend" | |
value="definitely" | |
type="radio" | |
class="input-radio" | |
checked/> Definitely | |
</label> | |
<label> | |
<input | |
name="user-recommend" | |
value="maybe" | |
type="radio" | |
class="input-radio"/> | |
Maybe</label> | |
<label><input | |
name="user-recommend" | |
value="not-sure" | |
type="radio" | |
class="input-radio" | |
/>Not sure</label> | |
</div> | |
<!--Code for dropdown selection--> | |
<div class="form-group"> | |
<p> | |
What is your favorite feature of CodyCamper? | |
</p> | |
<select id="most-like" name="mostLike" class="form-control" required> | |
<option disabled selected value>Select an option</option> | |
<option value="challenges">Challenges</option> | |
<option value="projects">Projects</option> | |
<option value="community">Community</option> | |
<option value="openSource">Open Source</option> | |
</select> | |
</div> | |
<!--Code for checkboxes.--> | |
<div class="form-group"> | |
<p> | |
What would you like to see improved? | |
<span class="clue">(Check all that apply)</span> | |
</p> | |
<label><input | |
name="prefer" | |
value="front-end-projects" | |
type="checkbox" | |
class="input-checkbox"/> | |
Front-end Projects</label> | |
<label> | |
<input | |
name="prefer" | |
value="back-end-projects" | |
type="checkbox" | |
class="input-checkbox" | |
/>Back-end Projects</label> | |
<label | |
><input | |
name="prefer" | |
value="data-visualization" | |
type="checkbox" | |
class="input-checkbox" | |
/>Data Visualization</label> | |
<label | |
><input | |
name="prefer" | |
value="challenges" | |
type="checkbox" | |
class="input-checkbox" | |
/>Challenges</label> | |
<label | |
><input | |
name="prefer" | |
value="forum" | |
type="checkbox" | |
class="input-checkbox" | |
/>Forum</label> | |
<label | |
><input | |
name="prefer" | |
value="additional-courses" | |
type="checkbox" | |
class="input-checkbox" | |
/>Additional Courses</label> | |
</div> | |
<!--Code for textbox--> | |
<div class="form-group"> | |
<p>Any comments or suggestions?</p> | |
<textarea | |
id="comments" | |
class="input-textarea" | |
name="comment" | |
placeholder="Enter your comment here..." | |
></textarea> | |
</div> | |
<!--Code for button--> | |
<div class="form-group"> | |
<button type="submit" id="submit" class="submit-button"> | |
Submit | |
</button> | |
</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
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> |
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
@import url('https://fonts.googleapis.com/css?family=Poppins:200i,400&display=swap'); | |
*{ | |
box-sizing: border-box; | |
} | |
body{ | |
background:#a95661; | |
font-family: 'Poppins', sans-serif; | |
font-size: 1rem; | |
font-weight: 400; | |
line-height: 1.4; | |
color: white; | |
margin: 0; | |
} | |
/*header style section*/ | |
.header{ | |
margin-top: 2rem; | |
} | |
h1 { | |
font-weight: 400; | |
line-height: 1.2; | |
} | |
p { | |
font-size: 1.125rem; | |
} | |
h1, | |
p { | |
margin-top: 0; | |
margin-bottom: 0.5rem; | |
} | |
.description { | |
font-style: italic; | |
font-weight: 200; | |
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4); | |
} | |
.text-center { | |
text-align: center; | |
} | |
/*form style section*/ | |
form{ | |
background: #874452; | |
padding: 2.5rem 0.625rem; | |
border-radius: 0.25rem; | |
margin: 0 1rem; | |
} | |
@media (min-width:40rem){ | |
#survey-form{ | |
padding:3rem; | |
width:70%; | |
margin:auto; | |
} | |
} | |
.form-group { | |
margin: 0 auto 1.25rem auto; | |
padding: 0.25rem; | |
} | |
.form-control { | |
display: block; | |
width: 100%; | |
height: 2.375rem; | |
padding: 0.375rem 0.75rem; | |
color: #495057; | |
background-color: #fff; | |
background-clip: padding-box; | |
border: 1px solid #ced4da; | |
border-radius: 0.25rem; | |
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; | |
} | |
.form-control:focus { | |
border-color: #80bdff; | |
outline: 0; | |
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); | |
} | |
.input-radio, | |
.input-checkbox { | |
display: inline-block; | |
margin-right: 0.625rem; | |
min-height: 1.25rem; | |
min-width: 1.25rem; | |
} | |
.input-textarea { | |
min-height: 200px; | |
width: 100%; | |
padding: 0.625rem; | |
resize: vertical; | |
} | |
.submit-button { | |
display: block; | |
width: 100%; | |
padding: 0.75rem; | |
background: green; | |
color: inherit; | |
border-radius: 2px; | |
cursor: pointer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment