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 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


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.


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.


                  <form id="form" novalidate="" name="contact_us" action="<?php echo esc_url( admin_url('admin-ajax.php') ); ?>">
    <input type="hidden" name="action" value="customer_data">
     <div class="inputs">
        <div class="single_input_block">
           <input id="first_name" name="first_name" type="text" placeholder="Имя" required=""> 
           <span>Мы хотим знать как вас зовут:)</span>
        <div class="single_input_block">
           <input id="phone" name="phone" type="phone" placeholder="Телефон" required="">
           <span>Без номера мы вам не дозвонимся</span>
        <div class="single_input_block">
           <input id="email" name="email" type="email" placeholder="Почта" required=""> 
           <span>Отправим лучшее предложение</span>
     <button id="submit" form="contact_us" type="submit"> Отправить</button>





                var formValue = {};
var btn = document.querySelector('#submit');
var email = document.querySelector('#email');
var my_form = document.querySelector('#form');
btn.addEventListener('click', validateForm);

function validateForm() {
  var arr = [...form.getElementsByTagName('input')];

  arr.forEach(function (element) {
    if (( != 'submit') && ( !='')) {
      formValue[] = element.value;

      if (!element.value) {
        var errrorInput = document.getElementById(;
        var visibility = 'visible';
        showMessage(errrorInput, visibility);
      } else if (element.value && != 'email') {
        var correctInput = document.getElementById(;
        var _visibility = 'hidden';
        showMessage(correctInput, _visibility);
      } else if (element.value && === 'email') {
      } else return;

function validateEmail(email) {
  var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

  if (reg.test(email.value) === false) {
    var errrorInput = my_form.getElementById(;
  } else {
    var correctInput = my_form.getElementById(;
    var visibility = 'hidden';
    showMessage(correctInput, visibility);

function showMessage(input, visibility) { = "visibility: ".concat(visibility, ";");