Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <!-- INSTRUCTIONS: Copy code only between BEGIN CODE TO COPY and END CODE TO COPY statements below -->

<!-- Buying Buddy Plugin for codepen.io -->
<script src='https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyAlDq8fLYmfwIZdmngXCW6Ts80NIlhjwi8'>
</script>
<script src='https://www.mbb2.com/version3/css/theme/acid/OLrJDh'></script>
<script>
  var MBB = {
    mbbUrl: 'https://www.mbb2.com/version3',
    seo: 'false'
  };
  MBB.data = {
    acid: 'OLrJDh',
    mbbdomain: 'codepen.io'
  };
</script>
<script src='https://www.mbb2.com/scripts/my-buying-buddy.4.0.js'></script>
<!-- End Buying Buddy Plugin -->

<div class="widgetwrap">
  <!--TITLE ONLY-->
  <section id="pen-title">
    <h2>(cs#9) Simplified Linear Search Form</h2>
    <p style="color:red">Updated October 2020 to improve accessibility.</p>
    <p>With a single input field for AREA, this allows one of 3 alternative areas options to be input: city, neighborhood and zip. After
      3 characters are entered, a selection list of matching values is shown. This demo form uses the DEMO MLS - valid
      values include 'arvada' for example.<br>
The background color and inner-outer wrappers can be modified to suit your own style.<br>
You will need to follow instructions for HTML, CSS and JavaScript.
      <br><small><a href="https://support.mybuyingbuddy.com/codepen/#disclaimer" target="_blank">PLEASE READ
          DISCLAIMER</a></small> </p>
  </section>

  <!--  **********  BEGIN CODE TO COPY  **********  -->
  <div id="MBBv3Form">
    <div class="bfg-cf-outerwrap">
      <div class="bfg-grid-container">
        <div class="bfg-cf-innerwrap">
          <!-- ** CHANGE THIS** Form must have a id -->
          <form id="form-1">
            <!-- ** CHANGE THIS** The MBB defined "mls_id" for YOUR MLS -->
            <!-- This is shown in the list of Authorized Domains in your Account, see the IDX Approval column-->
            <input type="hidden" name="mls_id" value="demo" />
            <!-- This forces all results to be property_type=attsf (for the DEMO mls)-->
            <input type="hidden" name="property_type" value="attsf" />            

            <!--Row Container-->
            <div class="bfg-grid-60 bfg-tablet-grid-50 bfg-mobile-grid-100">

              <!--Area placeholder-->
              <div class="bfg-input-wrap">
                <div class="bfg-area-search-wrap">
                  <input type="text" name="area_search" placeholder="Enter City, Neighborhood or Zip" aria-label="Enter City, Neighborhood or Zip"
                    class="bfg-input-field bfg-input-area-field" autocomplete="off" />
                  <input type="hidden" name="city" class="bfg-input-area-city" />
                  <input type="hidden" name="sub_area" class="bfg-input-area-sub_area" />
                  <input type="hidden" name="zip_code" class="bfg-input-area-zip_code" />
                  <div class="bfg-input-options-wrap">
                    <ul class="bfg-input-option-list bfg-option-list-area"></ul>
                  </div>
                </div>
              </div>
              <!--/Area placeholder-->

            </div>
            <!--Row Container-->

            <!--Row Container-->
            <div class="bfg-grid-20 bfg-tablet-grid-30 bfg-mobile-grid-100">

              <!--Price Placeholder-->
              <div class="bfg-input-wrap bfg-price-select">
                <div class="bfg-dropdown">
                  <div class="bfg-helper-input-field bfg-input-price-field">Select Price</div>
                </div>
                <div class="bfg-input-options-wrap">
                  <div class="bfg-grid-container">
                    <div class="bfg-grid-45 bfg-tablet-grid-45 bfg-mobile-grid-45 bfg-pt10 bfg-pr5 bfg-pl5">
                      <input type="text" name="price_min" value="" placeholder="Min Price" aria-label="Min price"
                        class="bfg-helper-input-field bfg-input-field-min bfg-price-sub-input" />
                    </div>

                    <div
                      class="bfg-grid-5 bfg-tablet-grid-5 bfg-mobile-grid-5 bfg-grid-parent bfg-pt10 bfg-pb10 bfg-center bfg-price-divider">
                      -</div>

                    <div class="bfg-grid-45 bfg-tablet-grid-45 bfg-mobile-grid-45 bfg-pt10 bfg-pb10 bfg-pr5 bfg-pl5">
                      <input type="text" name="price_max" value="" placeholder="Max Price" aria-label="Max price"
                        class="bfg-helper-input-field bfg-input-field-max bfg-price-sub-input" />
                    </div>
                  </div>
                  <ul class="bfg-input-option-list bfg-option-list-min">
                    <li data-val="">No Min</li>
                    <li data-val="250000">$250,000</li>
                    <li data-val="500000">$500,000</li>
                    <li data-val="750000">$750,000</li>
                    <li data-val="1000000">$1M</li>
                    <li data-val="1250000">$1.250M</li>
                    <li data-val="1500000">$1.5M</li>
                    <li data-val="1750000">$1.75M</li>
                    <li data-val="2000000">$2.0M</li>
                    <li data-val="2250000">$2.25M</li>
                    <li data-val="2500000">$2.5M</li>
                    <li data-val="3000000">$3.0M</li>
                    <li data-val="4000000">$4.0M</li>
                    <li data-val="5000000">$5.0M</li>
                    <li data-val="6000000">$6.0M</li>
                    <li data-val="7000000">$7.0M</li>
                    <li data-val="8000000">$8.0M</li>
                    <li data-val="9000000">$9.0M</li>
                    <li data-val="10000000">$10M</li>
                  </ul>
                  <ul class="bfg-input-option-list bfg-option-list-max bfg-hidden">
                    <li data-val="250000">$250,000</li>
                    <li data-val="500000">$500,000</li>
                    <li data-val="750000">$750,000</li>
                    <li data-val="1000000">$1M</li>
                    <li data-val="1250000">$1.250M</li>
                    <li data-val="1500000">$1.5M</li>
                    <li data-val="1750000">$1.75M</li>
                    <li data-val="2000000">$2.0M</li>
                    <li data-val="2250000">$2.25M</li>
                    <li data-val="2500000">$2.5M</li>
                    <li data-val="3000000">$3.0M</li>
                    <li data-val="4000000">$4.0M</li>
                    <li data-val="5000000">$5.0M</li>
                    <li data-val="6000000">$6.0M</li>
                    <li data-val="7000000">$7.0M</li>
                    <li data-val="8000000">$8.0M</li>
                    <li data-val="9000000">$9.0M</li>
                    <li data-val="10000000">$10M</li>
                    <li data-val="">No Max</li>
                  </ul>
                </div>
              </div>
              <!--/Price Placeholder-->

            </div>
            <!-- End Row Container-->

          

            <!--Row Container-->
            <div class="bfg-grid-20 bfg-tablet-grid-20 bfg-mobile-grid-100">

              <!--Start Search Button-->
              <div class="bfg-input-wrap">
              <!-- Change the target URL to be your designated RESULTS page -->
              <a href="#" class="bfg-btn btn-xlg btn-bg2 bfg-center"
                onclick="MBBv3_SubmitCustomSearchForm('form-1','https://s.codepen.io/bluefiregroup/details/f442f6eb6eaa6d832f015bbb8e24d545/');return false;"><i
                  class="icon-search"></i>Search</a>
              </div>  
              <!--/Search Button-->
      
            </div>
            <!--End row container-->

          </form>
          <div class="clearfix"></div>
        </div>
        <div class="bfg-grid-100 bfg-alignr">
          <p class="bfg-mb10"><a href="#" onclick="MBB_SearchForm();return false;"><small>Advanced Search</small></a>
          </p>
        </div>

      </div>
    </div>
  </div>
  <!--  **********  END CODE TO COPY  **********  -->

</div>
              
            
!

CSS

              
                /* 
  Styling makes the form present as shown
*/

/* main wrapper required */
#MBBv3Form {
}
/* Creates a translucent frame */
#MBBv3Form .bfg-cf-outerwrap {
  max-width: 950px;
  background: rgba(255, 255, 255, 0.5);
	border-radius: none;
  margin: 0 auto;
  padding: 15px 20px 0;
}
/* Creates the blue background */
#MBBv3Form .bfg-cf-innerwrap {
  background: rgba(70,189,228, 0.9);
  border: none;
	border-radius: 0;
  margin: 0 auto 5px;
	padding: 15px 15px 0 15px;
}
/* For new AREA and PRICE-selectors */ 
#MBBv3Form .bfg-helper-input-field {
    box-sizing: border-box;
    background: #fefefe;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    display: block;
    font-size: .8125em;
    font-family: Arial;
	  padding: 6px 12px;
    height: 32px;
    transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
    width: 100%;
}
#MBBv3Form .bfg-helper-input-field  {
    padding: 6px;
}
#MBBv3Form .bfg-helper-input-field:hover, 
#MBBv3Form .bfg-helper-input-field:focus {
    border-color: #6BACED;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15) inset, 0 0 8px rgba(82, 168, 236, 0.7);
}
#MBBv3Form .bfg-input-options-wrap {
  /* re-position the options box */
  margin-top: -1px;
  border-top: 1px solid rgba(0,0,0,.12); 
  min-width: 250px;
}
#MBBv3Form select.bfg-input-field {
  /* eliminate pseduo left/right padding in select box */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
/* add .dropdown around any select - adds arrow when pseudo padding removed */
#MBBv3Form .bfg-dropdown {
    position: relative;
}
#MBBv3Form .bfg-dropdown:after {
    content: "";
    position: absolute;
    right: 6px;
    top: 24px;
    width: 0; 
    height: 0; 
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #333;
}
#MBBv3Form .bfg-price-divider {
  line-height: 27px; 
  padding-left: 0;
  padding-right: 0;
}

/* Custom Styles */

#MBBv3Form .bfg-input-field, 
#MBBv3Form .bfg-input-field, 
#MBBv3Form .bfg-btn.btn-xlg {
  border: 1px solid rgba(0,0,0,.12);	
  border-radius: 2px;
  color: #757575;
  padding: 1em 0.6em;
  font-size: 15px;
  line-height: 1.3em;
  height: 50px;
}
#MBBv3Form .bfg-helper-input-field {
  border: 1px solid rgba(0,0,0,.12);	
  border-radius: 2px;
  color: #757575;
  padding: 1em 0.6em;
  font-size: 15px;
  line-height: 1.3em;
}
#MBBv3Form .bfg-dropdown > .bfg-helper-input-field {
  height: 50px;
}
#MBBv3Form .bfg-price-sub-input {
  font-size: 11px;
}
#MBBv3Form .bfg-btn i {
  font-size: 16px;
} 
#MBBv3Form .bfg-input-field, 
#MBBv3Form .bfg-input-field, 
#MBBv3Form .bfg-helper-input-field {
  background: #fafafa;
}

#MBBv3Form .bfg-pr5 {
  padding-right: 5px;
}
#MBBv3Form .bfg-pl5 {
  padding-left: 5px;
}
              
            
!

JS

              
                /*
** This script REQUIRES jQuery **
   If your website does not have jQuery loading then you will to add it.
   There are many hosted libraries available, for example, Google provides such libraries at
   https://developers.google.com/speed/libraries/#jquery

   INSTRUCTIONS
   1. Copy this JavaScript to your website and place in the <head> of the web page. Enclose between <script> tags
   2. Change mls_id to be the mls_id for your buying buddy account.
*/

jQuery(document).on("mbb-widgets-loaded", function() {
    mbbQuery(".bfg-area-search-wrap").bfgAreaSelect({mls_id: "demo"});
    mbbQuery(".bfg-price-select").bfgPriceSelect();
});
              
            
!
999px

Console