Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- 

Hello Camper!

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 

-->
<div class="form-task ">
    <header class="form-intro">
      <h1 id="title">
        Join the Team
      </h1>
      <p id="description">
        Join the Frosty Gaming team and have your say on the content we produce and the games we play.
      </p>
    </header>
   <div class="container form-wrapper">
    <form id="survey-form">
     <div class="form-element">
      <label for="name" id="name-label" class="form-label">Name</label>
      <input type="text" id="name" class="text-input form-input" placeholder="Enter Your Name" required>
    </div>
    
    <div class="form-element">
      <label for="email" id="email-label" class="form-label">Email</label> 
      <input type="email" id="email" class="text-input form-input" placeholder="Email Address" required>
    </div>
  
    <div class="form-element">
      <label for="number" id="number-label" class="form-label">Age</label>
      <input type="number" id="number" class="num-input form-input" placeholder="25" min="16" max="80" required >
    </div>
      
    <div class="form-element">
      <label for="dropdown" id="dropdown-label" class="form-label">Gender</label>
    <select  id="dropdown" class="form-input">
       <option disabled selected value>Select</option>
       <option value="male">Male</option>
       <option value="female">Female</option>
       <option value="other">Other</option>
        <option value="prefer-not">Prefer Not to Say</option>
      </select>
    </div>

    <div class="form-element">
      <h2>Preferred  Games</h2>
      <p>Choose the top three generes you would like to see us play:</p>
      <div class="preferences-group-one form-label">  
        <label>FPS
        <input name="game-types" type="checkbox" value="fps" class="multiple-choice">
        </label>
        <label>MMO
        <input name="game-types" type="checkbox" value="mmo" class="multiple-choice">
          </label>
        <label>Role-Playing
        <input name="game-types" type="checkbox" value="role-playing" class="multiple-choice">
          </label>
        <label>Stratergy
        <input name="game-types" type="checkbox" value="stratergy" class="multiple-choice">
        </label>
        <label>Sports
        <input name="game-types" type="checkbox" value="sports" class="multiple-choice">
          </label>
        <label>Racing
        <input name="game-types" type="checkbox" value="racing" class="multiple-choice">
          </label>
        <label>Horror
        <input name="game-types" type="checkbox" value="horror" class="multiple-choice">
          </label>
     </div>
      </div>
        
     <div class="form-element">
      <h2>Preferred Content</h2>
      <p>Pick the content you would like to see more of:</p>
       <div>
        <label>
          News
          <input name="content-types" class="content-selection multiple-choice" type="radio" value="news">
         </label>
          <label>
          Reviews
          <input name="content-types" class="content-selection multiple-choice" type="radio" value="news">
          </label>
            <label>
          Livestreams
          <input name="content-types" class="content-selection multiple-choice" type="radio" value="news">
          </label>
          <label>
          Walk-throughs
          <input name="content-types" class="content-selection multiple-choice" type="radio" value="news">
          </label>
          <label>
          Competitions
          <input name="content-types" class="content-selection multiple-choice" type="radio" value="news">
            </label>
       </div>
      
     </div>
  <div class="form-element">
      <p>If you have any additonal ideas or thoughts on the content you would like to see, or how our content could be better please leave us a message. Your feedback is important to us and we love to hear our communities thoughts.</p>

      <label for="text" class="form-label">Additional thoughts:</label>

      <textarea id="text" name="additional-thoughts" class="form-input" placeholder="Enter your ideas here..">
      </textarea>
    </div>

   <div class="form-element" class="submit-button">

      <input id="submit" type="submit" value="Submit">
  </div>

    </form>
  </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Play&display=swap');

*{
  margin:0;
  padding:0;
}

body{
  background-image:url("https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/4bdd888b-fe5c-4358-8c46-5362c7ce3154/dehn7hz-56d75669-c27f-4d2b-8e30-91dc2c542e4c.jpg/v1/fill/w_1280,h_720,q_75,strp/cool_gaming_background_4k_by_skullbreaker000_dehn7hz-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9NzIwIiwicGF0aCI6IlwvZlwvNGJkZDg4OGItZmU1Yy00MzU4LThjNDYtNTM2MmM3Y2UzMTU0XC9kZWhuN2h6LTU2ZDc1NjY5LWMyN2YtNGQyYi04ZTMwLTkxZGMyYzU0MmU0Yy5qcGciLCJ3aWR0aCI6Ijw9MTI4MCJ9XV0sImF1ZCI6WyJ1cm46c2VydmljZTppbWFnZS5vcGVyYXRpb25zIl19.oV9fk5Nb0ps6-6_Omk6AfhkNvdqDyQRvV_hLyys1S6Q");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color:white;
  height:100%;
  font-family:'Play', sans-serif;
}
.form-task{
  margin-left:25%;
  margin-right:25%;
  padding-bottom:30px;
}

@media(max-width:992px){
  .form-task{
    margin-left:10%;
    margin-right:10%;
  }
}

.form-intro{
  text-align:center;
  padding: 50px 20px 50px 20px;
}

.form-intro p{
  font-style:italic;
}

h1{
  font-size:50px;
  padding-bottom:15px;
}
h2{
  font-size:24px;
  padding-bottom:10px;
}
p{
  font-size:20px;
  padding-bottom:10px;
}

.form-wrapper{
  background-color:#1B1B1B  ;
  border-radius:10px;
  opacity:0.95;
  padding: 30px 0 30px 0;
}
.form-element{
  padding: 20px 0 20px 0;
  margin-left:10%;
  margin-right:10%;
  font-size:20px;
}

.form-input{
  border-radius:5px;
  width:100%;
  height:30px;
}

#text{
  width:100%;
  height:80px;
}

.content-selection{
  padding:10px 10px 10px 10px;
}

#submit{
  cursor:pointer;
  height:75px;
  background-color:#1B1B1B;
  border:none;
  color:white;
  width: 150px;
}

#submit:hover{
  background-color:white;
  color:#1B1B1B;
}








              
            
!

JS

              
                // !! 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. 



//Why is this not working?
var submit = document.getElementById('submit');

submit.addEventListener("click", function(event){
  var name = document.getElementById('name').value;
  var email = document.getElementById('email').value;
  var form = document.getElementsByClassName('form-wrapper');
  form.innerHTML = "Thank you for submitting your feedback " + name + ". An email has been sent to you at: " + email;
})
              
            
!
999px

Console