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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!-- THE CODEPEN SNIPPET BELOW CONTAINS A FORM BUILT WITH SUPER EASY FORMS -->
<html lang="en">
	<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="A serverless contact form for your website in less than a minute." content="">
    <meta name="Torus" content="">
    <title>Super Easy From</title>
		<!-- Bootstrap core CSS -->
		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  </head>
    <body class="p-5 bg-light">
      <!-- CONTACT SECTION -->
      <section class="bg-white py-4">
        <div class="container">
          <div class="row">
            <div class="col-md-12">
              <h4 class="h2 pb-2">Contact Us</h4>
              <!-- FORM BY SUPER EASY FORMS -->
              <form id="super-easy-form" alt="Form by Super Easy Forms" class="pb-3" action="#">
                <label for="first_name" class="small mb-0">first name</label>
                <input type="text" class="form-control" id="first_name" name="first_name" placeholder="first name" required>
                <label for="last_name" class="small mb-0">last name</label>
                <input type="text" class="form-control" id="last_name" name="last_name" placeholder="last name" required>
                <label for="email" class="small mb-0">email</label>
                <input type="email" class="form-control" id="email" name="email" placeholder="email" required>
                <label for="phone_number" class="small mb-0">phone number</label>
                <input type="number" class="form-control" id="phone_number" name="phone_number" placeholder="phone number" required>
                <label for="message" class="small mb-0">message</label>
                <textarea type="text" class="form-control" id="message" name="message" placeholder="message" required></textarea>
                <h5 id="contact-status" class="text-secondary" style="display:none;">Thanks for Contacting Us</h5>
                <button class="btn btn-primary mt-3" type="submit" id="super-easy-btn">Send</button>
              </form>
              <small>made with <a href="http://supereasyforms.com">super easy forms</a> <small> <!-- it's bad etiquette to use free stuff without giving some cred to the creators :) -->
             </div>   
           </div>
        </div>         
      </section>

      <!--Javascript-->
      <script
        src="https://code.jquery.com/jquery-3.4.1.min.js"
        integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
        crossorigin="anonymous">
      </script>

   </body>
</html>
 
            
          
!
            
              /* Write your custom CSS here */
            
          
!
            
              $(function(){
  $('#super-easy-form').submit(function(e){
    e.preventDefault();
    var formdata = toJSONString(this);
    console.log(formdata);
    $.ajax({
      type: "POST",
      url: "https://warlx5icu6.execute-api.us-east-1.amazonaws.com/deployment2019-05-22T07-53-19-000Z/",
      dataType: "json",
      contentType: "application/json",
      data: JSON.stringify( { "id": "","first_name": $('#first_name').val(),"last_name": $('#last_name').val(),"email": $('#email').val(),"phone_number": $('#phone_number').val(),"message": $('#message').val() } ),
      beforeSend: function(data) {
        $('#super-easy-btn').prop('disabled', true);
        $('#super-easy-form :input').prop('disabled', true);
        $('#contact-status').html('Sending...').show();
      },
      success: function(data) {
        console.log(data);
        $('#contact-status').text("We'll get back to you soon").show();
        $('#super-easy-form :input').removeProp('disabled');
        $('#super-easy-btn').removeProp('disabled');
      },
      error: function(jqXHR, textStatus, errorThrown) {
        $('#contact-status').text('Error. Please try again soon.').show();
        $('#super-easy-form :input').removeProp('disabled');
        $('#super-easy-btn').removeProp('disabled');
      }
    });
  }); 
				
  function toJSONString (form) {
    var obj = {};
    var elements = form.querySelectorAll("input, select, textarea");
    for(var i = 0; i < elements.length; ++i) {
      var element = elements[i];
      var name = element.name;
      var value = element.value;
      if(name) {
        obj[name] = value;
      }
    }
    return JSON.stringify(obj);
  }
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console