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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">

<main>
    <div>
        <form id="survey-form">
            <div class="desc_container">
                <h1 id="title">Developer resource survey</h1>
                <p id="description">Let us know what skills will move your project forward.</p>
            </div>
            <div class="formlabel">
                <label for="name" id="name-label"><span class="required">*</span>Primary contact:</label>
            </div>
            <div class="formcontrol">
                <input type="text" id="name" name="name" placeholder="Enter primary contact name" required>
            </div>
            <div class="formlabel">
                <label for="email" id="email-label"><span class="required">*</span>Email:</label>
            </div>    
            <div class="formcontrol">
                <input type="email" id="email" name="email" placeholder="Enter email address" required>
            </div>
            <div class="formlabel">
                <label for="number" id="number-label"><span class="required">*</span>Budget for resource (USD):</label>
            </div>
            <div class="formcontrol">
                <input type="number" class="inputcontrol" size="12" id="number" name="number" min="1" max="150000" placeholder="Budget" required>
            </div>    
            <div class="formlabel">
                <label for="dropdown" id="dropdown-label">Developer role:</label>
            </div>
            <div class="formcontrol">
                <select id="dropdown" name="role">
                    <option value="">--Select developer role--</option>
                    <option value="FRONTEND">Front end</option>
                    <option value="BACKEND">Back end</option>
                    <option value="DEVOPS">Devops</option>
                    <option value="DBA">Database (DBA)</option>
                    <option value="AUTOMATION">Test automation</option>
                    <option value="FULLSTACK">Full stack</option>
                </select>
            </div>
            <div class="formlabel">
                <label id="timeframe-label">Project timeline (months)</label>:
            </div>
            <div class="formcontrol">
                <ul>
                    <li>
                        <label for="underSixMonths">
                            <input type="radio" id="underSixMonths" name="timeframe" value="uotpsixmonths" checked>1 to 6
                        </label>
                    </li>
                    <li>
                        <label for="sixMonthsToYear">
                            <input type="radio" id="sixMonthsToYear" name="timeframe" value="6to12months">6 to 12
                        </label>
                    </li>
                    <li>
                        <label for="overOneYear">
                            <input type="radio" id="overOneYear" name="timeframe" value="12monthsplus">12+
                        </label>
                    </li>
                    <li>
                        <label for="custom">
                            <input type="radio" id="custom" name="timeframe" value="custom">N/A
                        </label>
                    </li>
                </ul>
            </div>
            <div class="formlabel">
                <label id="languages-label">Languages you use:<br>(Check all that apply)</label>
            </div>
            <div class="formcontrol">
                <ul>
                    <li>
                        <input type="checkbox" id="python" name="languages" value="python">
                        <label for="python">Python</label>
                    </li>
                    <li>
                        <input type="checkbox" id="javascript" name="languages" value="javascript">
                        <label for="javascript">JavaScript</label>
                    </li>
                    <li>
                        <input type="checkbox" id="webdev" name="languages" value="webdev">
                        <label for="webdev">HTML/CSS/SASS</label>
                    </li>
                    <li>
                        <input type="checkbox" id="clang" name="languages" value="clang">
                        <label for="clang">C/C++</label>
                    </li>
                    <li>
                        <input type="checkbox" id="javajvm" name="languages" value="javajvm">
                        <label for="javajvm">Java/JVM Languages</label>
                    </li>
                    <li>
                        <input type="checkbox" id="other" name="languages" value="other" onClick="toggleOtherTextField()">
                        <label for="other">Other</label>
                            <div>
                                <input type="text" style="visibility:hidden" class="inputcontrol"
                                        id="otherLanguage" name="otherLanguage" placeholder="Other language">
                            </div>
                    </li>
                </ul>
            </div>
            <div class="formlabel">
                <label class="formlabel" for="additional-comments">Additional comments: </label>
            </div>
            <div class="formcontrol">
                <textarea id="additional-comments" name="comments" placeholder="Enter additional comments"></textarea>
            </div>
            <div class="submitrow">
            <input type="hidden" id="submissionDate" name="submissionDate" value="new Date()">
            <button type="submit" id="submit">Submit form</button>
            </div>
        </form>
    </div>
</main>

              
            
!

CSS

              
                body {
    background-color:  navy;
    font-family: Arial, sans-serif;
}

#survey-form {
    display: grid;
    grid-template-columns: 0.7fr, 1.3fr;
    grid-column-gap: 10px;
    grid-row-gap: 20px;
    width: 75%;
    background: #fff;
    padding-top: 5px;
    padding-bottom: 15px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
    max-width: 800px;
}

.desc_container {
    grid-column: 1 / 3;
}

.formlabel {
    grid-column: 1 / 2;
    text-align: right;
}

.formcontrol {
    grid-column: 2 / 3;
}

.submitrow {
    grid-column: 2 / 3;
}

.required {
    padding-right: 5px;
    color: red;
}

label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #000;
}

input[type=text], [type=email], [type=number] {
    width: 25vw;
    padding: 5px 5px;
    box-sizing: border-box;
}

#additional-comments {
    height: 100px;
    padding: 2px 2px;
    box-sizing: border-box;
    width: 25vw;
}

ul {
    list-style: none;
    padding-left: 0px;
    padding-top: 0px;
    margin-top: 0px;
    margin-left: 0px;
    margin-bottom: 0px;
}

li {
    padding-top: 3px;
    padding-bottom: 3px;
}

#description {
    text-align: center;
}

h1 {
    text-align: center;
}

@media (max-width: 731px) {
    #survey-form {
        grid-template-columns: 1fr;
        grid-row-gap: 10px;
        padding: 5px 5px 5px 5px;
        width: 80vw;
    }

    .desc_container {
        grid-column: 1 / 1;
    }

    .formlabel {
        text-align: left;
        grid-column: 1 / 1;
    }

    .formcontrol {
        width: 80vw;
        justify-self: start;
        grid-column: 1 / 1;
    }

    .submitrow {
        margin-left: auto;
        margin-right: auto;
        grid-column: 1 / 1;
    }

    label {
        margin-top: 0px;
    }

    #additional-comments, input[type=text], [type=email], [type=number] {
        width: 80vw;
    }
}

#submit {
    background-color: green;
    color: #fff;
}

#description {
    text-align: center;
}

              
            
!

JS

              
                function toggleOtherTextField() {
  const otherLanguageCheckbox = document.getElementById('otherLanguage');
  if (document.getElementById('other').checked) {
    otherLanguageCheckbox.style.visibility = 'visible';
  } else {
    otherLanguageCheckbox.style.visibility = 'hidden';
    otherLanguageCheckbox.value = '';
  }
}
              
            
!
999px

Console