Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- See Wordpress/wp7 form HTML/SHORTCODE from line 52-->
<div id="form-container">
		            	<form id="contact-form" name="contact-form" method="POST" data-name="Contact Form">

		                    <div class="row">
<!-- Title -->
<div class="col-xs-12 col-sm-12 col-lg-12">
  <h1>WORDPRESS &amp; WP7 CONTACT FORM <br>WITH ANIMATED PLACEHOLDER TEXT</h1>
</div>                        
<!-- Name -->
<div class="col-xs-12 col-sm-12 col-lg-12 contact">
 <div class="form-group">
  <label class="form-label" for="name">Name</label>
	 <input type="text" id="name" class="form form-control" name="name" data-name="Name">
  </div>
</div>
                                
<!-- E-mail -->
<div class="col-xs-12 col-sm-12 col-lg-12 contact">
 <div class="form-group">
  <label class="form-label" for="email">Email</label>
	 <input type="email" id="email" class="form form-control" name="email-address" data-name="email">
 </div>
</div>

<!-- Phone -->
<div class="col-xs-12 col-sm-12 col-lg-12 contact">
 <div class="form-group">
  <label class="form-label" for="number">Number</label>
   <input type="tel" id="number" class="form form-control" name="phone" data-name="number">
 </div>
</div>

<!-- Message -->
<div class="col-xs-12 col-sm-12 col-lg-12 contact">
 <div class="form-group">
  <label class="form-label" for="text-area">Message</label>
   <textarea id="text-area" class="form textarea form-control" name="message" data-name="Text Area"></textarea>
 </div>
</div>
                          
</div>

<!-- Form submission -->
<button type="submit" id="valid-form" class="contact-button">SEND</button>
<div class="col-xs-12 col-sm-12 col-lg-12">
</div>
</form>

</div>

<!-- Below is the Wordpress/wp7 form HTML/SHORTCODE -->
<!--

<div class="form-group">
      <label class="form-label-outer"><span class="form-label">What is your name?</span> [text* your-name]</label>
    </div>
    <div class="form-group">
      <label class="form-label-outer"><span class="form-label">What is your email?</span>[email* your-email]</label>
    </div>
    <div class="form-group">
      <label class="form-label-outer"><span class="form-label">How can we help?</span>[textarea* textarea-876]</label>
    </div> 
<div class="form-group">
[submit class:contact-button "Send"]
</div>

-->
              
            
!

CSS

              
                h1 {
  font-size: 22px;
  text-align: center;
  padding-bottom: 20px;
  color: #323232;
}

#form-container {
  font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
  position: relative;
  display: table;
  padding: 50px 0px;
  border-radius: 0;
  background: transparent;
  margin-left: auto;
  margin-right: auto;
}

.form-wrapper {
  max-width: 30%;
  min-width: 300px;
  padding: 50px 30px 50px 30px;
  margin: 50px auto;   
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 15px 35px rgba(50,50,93,.1),0 5px 15px rgba(0,0,0,.07);
}

.form-group {
  position:relative;
  margin-bottom: 20px; 

  & + .form-group {
    margin-top: 30px;
  }
}

.form-label {
  position: absolute;
  left: 0;
  top: 10px;
  color: #999;
  z-index: 10;
  padding-left: 10px;
  cursor: text;
  -webkit-transition: transform 200ms ease-out, font-size 200ms ease-out;
  -moz-transition: transform 200ms ease-out, font-size 200ms ease-out;
  transition: transform 200ms ease-out, font-size 200ms ease-out;
}

.focused .form-label {
  transform: translateY(-190%);
  font-size: .75em;
  color: #6a04e7e6;
  cursor: default !important;
}

.form-input {
  position: relative;
  padding: 12px 0px 5px 0;
  width: 100%;
  outline: 0;
  border: 0;
  box-shadow: 0 1px 0 0 #e5e5e5;
  -webkit-transition: box-shadow 150ms ease-out;
  -moz-transition: box-shadow 150ms ease-out;
  transition: box-shadow 150ms ease-out;
  
  &:focus {
    box-shadow: 0 2px 0 0 blue;
  }
}

.contact-button {
  color: #fff;
  letter-spacing: 2px;
	width: 100%;
  padding: 9px;
  background-color: #741be1;
  border: 0px;
	cursor: pointer;
  -webkit-transition: all 200ms;
  -moz-transition: all 200ms;
  transition: all 200ms;
}
.contact-button:hover {
  background-color: #741be1e3;
}

input[type="text"], input[type="password"], input[type="tel"], input[type="email"], input.text, input.title, textarea, select {
  font-family: 'Montserrat',Helvetica,Arial,Lucida,sans-serif;
  font-size: 16px;
  background-color: #b7b7b74d;
  padding: 10px;
  color: #7d7d7d;;
  border: 0px ;
  transition: border .1s linear;
  width: 95%;
  -webkit-transition: all 200ms;
  -moz-transition: all 200ms;
  transition: all 200ms;
}

input[type=text]:focus,
input[type=email]:focus,
input.text:focus,
input.title:focus,
textarea:focus,
select:focus {
/* Add style to input field when focused*/
}

input[type=text].filled,
input[type=email].filled,
input.text.filled,
input.title.filled,
textarea.filled,
select.filled {
/* Add style to input field when filled*/
} 
              
            
!

JS

              
                $('input, textarea').focus(function(){
$(this).parents('.form-group').addClass('focused');
});

$('input, textarea').blur(function(){
  var inputValue = $(this).val();
  if ( inputValue == "" ) {
$(this).removeClass('filled');
$(this).parents('.form-group').removeClass('focused');  
  } else {
  $(this).addClass('filled');
}
})    
         
        
      

              
            
!
999px

Console