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.


For general guidance and help see
UPDATED 9/6/18 - updated the Javascript

1. Make sure you know the MBB MLS CODE (mls_id) values for each MLS as these will be used in this code
In the example below the two values are "mls-1" and "mls-2".
NOTE: This is the My Buying Buddy "mls_id" field which you can discover from the Widget Wizards.

2. Set the default MLS for your custom form using the the input value shown below
(in this case "mls-1")

3. Add additonal "data-mls" parameter to each option value that is to be used,
and in each case specify the appropriate MLS 

4. Add the jQuery snippet to your page too
<!-- Buying Buddy Plugin for -->
<script src=''></script>
<script src=''></script>
var MBB = { mbbUrl: '', seo : 'false' }; = { acid : 'OLrJDh', mbbdomain : '' };
<script src=''></script>
<!-- End Buying Buddy Plugin -->

<section id="pen-title">
  <h2>(cs#7) Multiple MLS Search with a Combination Field</h2>
  <p style="color:red">Updated October 2020 to improve accessibility.</p>
  <p>This example shows how an OPTION field can additionaly specificy the MLS to use based on the selected value.<br>In this example, the choice of CITY determines the MLS to search.<br>
    **NOTE This is NOT a working form, it's purpose is to illustrate how this feature is coded.
 <br><small><a href="" target="_blank">PLEASE READ DISCLAIMER</a></small></p>

<div id="MBBv3Form">
  <div class="bfg-grid-container">
    <div class="custom-form-wrapper clearfix">
      <form id="form-1" class="mbb-lcf-form">
        <!-- ** CHANGE THIS ** Set value to the MLS you want to be default when city is not selected -->
        <input id="multi-mls-mls" name="mls_id" type="hidden" value="mls-1" />        
        <!--End Form Header-->
        <div class="bfg-grid-30 bfg-tablet-grid-30 bfg-grid-parent">
          <!--Start Text Box Placeholder-->
          <div class="bfg-grid-100">
            <div class="bfg-input-wrap">
              <div class="bfg-input-item">
                <!-- ** CHANGE THIS ** make these correct city names values and mls_id values  -->
                <select id="multi-mls-city" name="city" class="bfg-input-field" aria-label="City">
                  <option value="" selected="" disabled="">City</option>
                  <option value="arvada" data-mls="mls-1">Arvada</option>
                  <option value="denver" data-mls="mls-1">Denver</option>
                  <option value="louisville" data-mls="mls-2">Louisville</option>
                  <option value="thornton" data-mls="mls-1">Thornton</option>
                  <option value="westminster" data-mls="mls-2">Westminster</option>
        <!--End container-->



Helps reduce spaces between fields for smaller displays
@media (max-width: 1024px) {
  #MBBv3Form .bfg-grid-container [class^="bfg-grid-"]:not(.bfg-grid-parent)   {
    padding-left: 5px;
    padding-right: 5px;

This CSS wrapper is optional and provides the translucent background. 
All other CSS comes from the MBB plugin.
#MBBv3Form .custom-form-wrapper {
  padding-top: 20px;
	padding-bottom: 5px;
  border-radius: 2px;
  border-color: #dddddd;
  border-width: 1px;
  border-style: solid;
  background: rgba(255,255,255,0.2);



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

1. Copy this JavaScript to your website and place AFTER the custom form HTML loads (e.g. in your page footer). Enclose between <script> tags.

2. Make sure that the ID of the "select" matches the elements in the JavaScript below
   In this example <select id="multi-mls-city" ....


    	var selected = mbbQuery(this).val();
    	if ( selected.length ){ mbbQuery("#multi-mls-mls").val( mbbQuery("option:selected", this).attr("data-mls") ); }