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

              
                <!-- LIBRARY INITIALIZATION -->
<script type="text/javascript" src="https://cdn.iubenda.com/consent_solution/iubenda_cons.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script>
   _iub.cons.init({
      api_key: "4hXF27pDbQXPUyqx14smDoxU5yymGj5T",
      sendFromLocalStorageAtLoad: false
   });
</script>
<!-- FORM 1 -->
<form action="" id="the-form" class="iub_cons_form">
    <input type="text" name="id" value="12141412" hidden/>
    <p>
        First name:<br/>
        <input type="text" name="first_name" data-cons-subject="first_name"/>
    </p>
    <p>
        Last name:<br/>
        <input type="text" name="last_name" data-cons-subject="last_name"/>
    </p>
    <p>
        Full Name:<br/>
        <input type="text" name="full_name" data-cons-subject="full_name"/>
    </p>
    <p>
        Email<br/>
        <input type="text" name="email" data-cons-subject="email"/>
    </p>
    <p>
        Password<br/>
        <input type="password" name="password" data-cons-exclude/>
         </p>
      <div>
     <p>
       <input type="checkbox" name="documents" data-cons-preference="legal_documents"/>
      I've read the Privacy Policy and accept the Terms and Condition
     </p>
    <p>
      <input type="checkbox" name="newsletter" data-cons-preference="newsletter"/>
      I agree to receiving a newsletter with information and offers regarding this service (optional)
    </p>
    <p>
      <input type="checkbox" name="dem" data-cons-preference="dem" />
      I agree to receiving a newsletter with information and offers about products and services by third parties (optional)
    </p>
  </div>
    <input type="submit" id="submit-btn"/>
</form>
<!-- FORM 2 -->
<form action="" id="the-form2" class="iub_cons_form">
    <input type="text" name="id" value="12141412" hidden/>
    <p>
        First name:<br/>
        <input type="text" name="first_name" data-cons-subject="first_name"/>
    </p>
    <p>
        Last name:<br/>
        <input type="text" name="last_name" data-cons-subject="last_name"/>
    </p>
    <p>
        Full Name:<br/>
        <input type="text" name="full_name" data-cons-subject="full_name"/>
    </p>
    <p>
        Email<br/>
        <input type="text" name="email" data-cons-subject="email"/>
    </p>
    <p>
        Password<br/>
        <input type="password" name="password" data-cons-exclude/>
    </p>
    <div>
     <p>
       <input type="checkbox" name="documents" data-cons-preference="legal_documents"/>
      I've read the Privacy Policy and accept the Terms and Condition
     </p>
    <p>
      <input type="checkbox" name="newsletter" data-cons-preference="newsletter"/>
      I agree to receiving a newsletter with information and offers regarding this service (optional)
    </p>
        <p>
      <input type="checkbox" name="dem" data-cons-preference="dem" />
      I agree to receiving a newsletter with information and offers about products and services by third parties (optional)
    </p>
  </div>
    <input type="submit" id="submit-btn2"/>
</form>
<!-- SUBMIT -->
<script>
  $("#submit-btn").click(function (e) {
    e.preventDefault();
    // Synchronous call, it's sent right when this function is executed
    _iub.cons.submit({
      writeOnLocalStorage: false, // default: false
      form: {
        selector: document.getElementById('the-form'),
      },
      consent: {
        legal_notices: [       
          {
                    
            identifier: 'privacy_policy',
                  
          },          
          {
                    
            identifier: 'cookie_policy',
              
          },     
          {
               
            identifier: 'terms',
            
          }
        ],
      }
    })
      .success(function (response) {
        console.log("success", response);
      })
      .error(function (response) {
        console.log("error", response);
      });
  });
  
  $("#submit-btn2").click(function (e) {
    e.preventDefault();
    // Synchronous call, it's sent right when this function is executed
    _iub.cons.submit({
      writeOnLocalStorage: false, // default: false
      form: {
        selector: $("#the-form2"),
      },
      consent: {
        legal_notices: [
                  {
                    identifier: 'privacy_policy',
              
                  },
                  {
                    identifier: 'cookie_policy',
            
                  },
                  {
                    identifier: 'terms',
               
                  }
        ],
      }
    })
      .success(function (response) {
        console.log("success", response);
      })
      .error(function (response) {
        console.log("error", response);
      });
  });
  </script>
              
            
!

CSS

              
                .iub_cons_form{
  /*float:left;
  margin-left:100px;*/
  margin-bottom:60px;
}
              
            
!

JS

              
                
              
            
!
999px

Console