cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <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 = {
    name: e.target['name-field'].value,
    email: e.target['email-field'].value,
    subject: e.target['other-subject-field'].value || e.target['subject-field'].value,
    body: e.target['body-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(e.target.value === 'Other') {

  } else {

Loading ..................