Skip to content

Instantly share code, notes, and snippets.

@PalomaCortez
Last active February 1, 2022 13:10
Show Gist options
  • Save PalomaCortez/ccdedcf7117d70b4aafd1f1f05a9d796 to your computer and use it in GitHub Desktop.
Save PalomaCortez/ccdedcf7117d70b4aafd1f1f05a9d796 to your computer and use it in GitHub Desktop.
survey_form
// !! 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.
body{
background-color: #add8e6;
text-align: center;
max-width: 420px;
color: #000080;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}
h1{
font-weight: bold;
}
p{
font-weight: bold;
padding-top: 30px;
}
.textimput{
align: left;
width: 75%;
}
label {
padding-bottom: 30px;
}
#topic{
padding-top: 30px;
font-weight: bold;
}
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!--
Hello Camper!
For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding!
- The freeCodeCamp Team
-->
<h1 id="title">People`s habits in recycling</h1>
<div>
<p id="description">This is a short inquire in order to comprehend the knoledge of a population have on recycling and their practices.</p>
<form action="submit_inquiry" id="survey-form">
<label for="name" id="name-label"> Name: </label>
<input type="name" class="textimput" id="name" placeholder="Enter youy name" required><br />
<br />
<label for="email" id="email-label"> Email: </label>
<input type="email" class="textimput" id="email" placeholder="Enter your email" required><br />
<br />
<label for="Zip-code" id="number-label"> Zip-code: </label>
<input type="number" class="textimput" id="number" placeholder="enter your zip code" required value="00000-000" min="00000" max="99999999"><br />
<br />
<label>
<p class="topic">Do you recicle?</p>
<input type="radio" name="yes-no" value="yes-no" checked>yes
<input type="radio" name="yes-no" value="yes-no">no
</label>
<br />
<br />
<label class="topic" for="dropdown">How do your city segragate the reciclables?</label>
<select id="dropdown">City`s segregation
<div class="dropdownContent">
<option value="dry/wet">dry / wet</option>
<option value="paper/plastic and metal/glass">paper / plastic and metal / glass</option>
<option value="paper/plast/metal/glass">paper / plast / metal / glass</option>
<option value="paper/plast/metal/glass by collor">paper / plast / metal / glass by collor</option>
<option value="none">none</option>
</select>
<p class="topic">What do you segragate between your reciclables?</p>
<label for="organic"><input id="organic" type="checkbox" value="material"> organic</label>
<label for="paper"><input id="paper" type="checkbox" value="material"> paper</label>
<label for="metal"><input id="metal" type="checkbox" value="material"> metal</label>
<label for="plastic"><input id="plastic" type="checkbox" value="material"> plastic</label><br />
<label for="glass"><input id="glass" type="checkbox" value="material"> glass</label>
<label for="batteries"><input id="batteries" type="checkbox" value="material"> batteries</label>
<label for="lamps"><input id="lamps" type="checkbox" value="material"> lamps</label>
<label for="e-waste"><input id="e-waste" type="checkbox" value="material"> e-waste</label>
<br />
<br />
<p> Tell us if you consider the your city`s recycling system eficient. What improvement suggestions do you have?: </p>
<textarea rows="5" cols="35" placeholder="Enter text here"name="comment" ></textarea><br />
<br />
<button id="submit" type="submit">Submit</button>
</form>
</div>
<!--
HTML5 validation error email
non-number error
min max atribute validadion
checkboxes, each of which must have a value attribute
textarea at the end for additional comments.
id="submit"
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment