Pen Settings



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


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.


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.


                <h2>Register for a free Measure and Quote</h2>

<form method="get" target="_new">
  <label for="name">Name</label>
  <input type="text" id="name" name="name">
  <label for="address1">Address</label>
  <input type="search" id="address_line_1" name="address_line_1" placeholder="Enter address here" class="address-field"><br>
  <input type="text" id="address_line_2" name="address_line_2" class="address-field">

  <label for="suburb">Suburb</label>
  <input type="text" id="suburb" name="suburb" class="address-field">

  <label for="city">Town/City</label>
  <input type="text" id="city" name="city" class="address-field">
  <label for="postcode">Postcode</label>
  <input type="text" id="postcode" name="postcode" class="address-field">
    <input type="submit" name="submit" value="Register">

<!-- Jquery -->
<script src=""></script>



                body {
    padding: 5px;

label {
    margin: 1em 0 0;
    display: block;

input[type=text] {
    width: 20em

input[type=search] {
    width: 20.6em

h2 {
    font-weight: bold;

p {
    margin: 1em 0 0;



                (function() {
    var widget, initAF = function() {
        widget = new AddressFinder.Widget(
            'NZ', {
                "address_params": {}
      widget.on('result:select', function(selectedAddress, metaData) {
        var allowedCities = ["Wellington", "Auckland", "Christchurch"];
        let selected = new AddressFinder.NZSelectedAddress(selectedAddress, metaData);
        let selectedCity =
        if (!allowedCities.includes(selectedCity)) {
          alert("Sorry, we only provide services in NZ's three major cities.");
        } else {
          document.getElementById('address_line_1').value = selected.address_line_1();
          document.getElementById('address_line_2').value = selected.address_line_2();
          document.getElementById('suburb').value = selected.suburb();
          document.getElementById('city').value =;
          document.getElementById('postcode').value = selected.postcode();  

    function downloadAF(f) {
        var script = document.createElement('script');
        script.src = '';
        script.async = true;
        script.onload = f;
    document.addEventListener('DOMContentLoaded', function() {