Pen Settings



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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <div class="container">
  <form onsubmit="sendEmail(event)">
    <legend>Contact Form</legend>
    <div id="alert-field" class="alert hidden">
      <p>Uh oh! Something went wrong!</p>
    <div class="form-group col-xs-6">
      <label for="name-field">Name</label>
      <input type="text" class="form-control" id="name-field" name="name-field" placeholder="Your name" required>
    <div class="form-group col-xs-6">
      <label for="email-field">Email</label>
      <input type="email" class="form-control" id="email-field" name="email-field" placeholder="Email address" required>
    <div id="subject-select" class="form-group col-xs-12">
      <label for="subject-field">Subject</label>
      <select class="form-control" name="subject-field" onchange="changeSubject(event)"  required>
        <option value="Consulting">#EdTech Consulting</option>
        <option value="Web Development">Web Development projects</option>
        <option value="Google Scripts">Google Apps Scripts</option>
        <option value="G Suite for Education">G Suite for Education Tools</option>
        <option value="Other">Other</option>
    <div id="hidden-other-subject" class="form-group col-xs-6 hidden">
      <label for="other-subject-field">Other</label>
      <input type="text" class="form-control" id="other-subject-field" name="other-subject-field" placeholder="Other subject" />
    <div class="form-group col-xs-12">
      <label for="body-field">Message</label>
      <textarea id="body-field" name="body-field" class="form-control" placeholder="Type your message here" required></textarea>
    <div class="form-group col-xs-12">
      <button type="submit" class="btn btn-primary btn-lg btn-block">Submit</button>  


  margin-top: 20px
    width: 100%
  transition: all 0.5s


                $(function() {

function formFocus() {

function sendEmail(e) {

  const POST_URL = '';

  const postRequest = {
    subject:['other-subject-field'].value ||['subject-field'].value,
  if(POST_URL) {
    $.post(POST_URL, JSON.stringify(postRequest))
      .then(res => {
          .addClass(`alert alert-${res.code}`)

  } else {
    alert('You must set the POST_URL variable with your script ID');


function changeSubject(e) {
  if( === 'Other') {

  } else {