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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <!--Add Floating Labels 
https://getbootstrap.com/docs/5.0/forms/floating-labels/ 
-->

<div class="container d-grid gap-3">

  <div class="mt-5">

    <div>
      <label for="audienceName" class="form-label">
        <h3>Audience Preset</h3>
      </label>
      <select id="audienceName" class="form-select d-flex" aria-label="Audience Present Select">
        <option selected>--Select--</option>
        <option value="1">Searching US 30 Days</option>
        <option value="2">i18n example</option>
        <option value="">Access Every Day?</option>
        <option value="">Has Searched in the last 6 Months but has No Resume</option>
      </select>
    </div>

    <div class="mt-5">
      <hr />
      <h3>Jobsearch/Mobsearch</h3>

      <div class="row align-items-baseline">
        <div class="col col-auto">
          <select id="description_who" class="form-select" aria-label="Who are we targeting?">
            <option selected>--Select--</option>
            <option value="1">Accounts</option>
            <option value="2">Advertisers</option>
          </select>
        </div>

        <div class="col col-auto">
          that have
        </div>

        <div class="col col-auto">
          <select id="description_haveDone" class="form-select" aria-label="What have they done?">
            <option selected>--Select--</option>
            <option value="1">searched</option>
            <option value="2">applied</option>
            <option value="3">posted</option>
          </select>
        </div>

                <div class="col col-auto">
          about
        </div>
        
        <div class="col col-auto">
<input placeholder="keywords">
        </div>
                <div class="col col-auto">
          and not about
        </div>
        
        <div class="col col-auto">
<input placeholder="keywords">
        </div>
        
                        <div class="col col-auto">
          located
        </div>
        
        
        <div class="col col-auto">
          
          <!-- Change this to an input field that will give the option of another menu "Zipcode" is picked-->
          <select id="description_where" class="form-select" aria-label="Where are they looking?">
            <option selected>--Select--</option>
            <option value="1">in the US</option>
            <option value="2">in Zipcode(s)</option>
            <option value="3">in Select Countries</option>
            <option value="3">in All Countries</option>
          </select>
        </div>

        <div class="col col-auto">
          via
        </div>

        <div class="col col-auto">
          <select id="description_how" class="form-select" aria-label="How did they search?">
            <option selected>--Select--</option>
            <option value="1">mobile or desktop</option>
            <option value="2">mobile</option>
            <option value="3">desktop</option>
          </select>
        </div>

        <div class="col col-auto">
          in the last
        </div>

        <div class="col col-auto">
          <select id="description_when" class="form-select" aria-label="Timeframe">
            <option selected>--Select--</option>
            <option value="1">30 days</option>
            <option value="2">14 days</option>
            <option value="3">7 days</option>
          </select>
        </div>
      </div>

      <div class="mt-2">
        <div class="row row-cols-4 g-2">
          <div class="col col-auto">
            <b>And Also</b>
          </div>
          <div class="col col-auto">

          </div>
          <div class="btn btn-outline-primary btn-sm" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Expand</div>
        </div>
        <div class="collapse" id="collapseExample">

          <div class="list-group mt-2">
            <label class="list-group-item d-flex align-items-baseline">
              <input class="form-check-input me-1" type="checkbox" value=""><!--
<br>Help text (info icon=index tied to)-->
              <div class="input-group mb-3">
                <span class="input-group-text" id="inputGroup-sizing-default">Keywords</span>
                <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                
              </div>
              <div class="input-group mb-3">
                <span class="input-group-text" id="inputGroup-sizing-default">Exclude Keywords</span>
                <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                
              </div>
            </label>
            <label class="list-group-item d-flex align-items-baseline">
              <input class="form-check-input me-1" type="checkbox" value="">

              <div class="input-group mb-3">
                <span class="input-group-text" id="inputGroup-sizing-default">Search Terms</span>
                <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
              </div>
            </label>
            <label class="list-group-item d-flex gap-2">
              <input class="form-check-input me-1" type="checkbox" value="">
              <p>Has a resume:</p>
              <span>No</span>
              <div class="form-check form-switch">
                <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
              </div>
              <span>Yes</span>
            </label>
            <!--  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Fourth checkbox
  </label>
  <label class="list-group-item">
    <input class="form-check-input me-1" type="checkbox" value="">
    Fifth checkbox
  </label> -->
          </div>
          <br><button type="button" class="btn btn-secondary">+ Custom Field</button>

        </div>
      </div>

      <!--This is the third part for the picker-->

      <div class="mt-5">
        <hr />
        <div class="d-flex gap-2 justify-content-end">
          <button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">Save Preset</button>
          <button type="button" class="btn btn-primary">Generate Code</button>
        </div>
      </div>

      <!-- Modal -->
      <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title" id="exampleModalLabel">Save Audience Preset</h5>
              <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                            <div class="input-group mb-3">
                <span class="input-group-text" id="inputGroup-sizing-default">Name</span>
                <input type="text" class="form-control" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
              </div>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Close</button>
              <button type="button" class="btn btn-primary">Save</button>
            </div>
          </div>
        </div>
      </div>
      
            <!-- Modal End-->

      <div class="mt-5">
        <label for="generatedCode" class="form-label">Generated Code</label>
        <br>
        <textarea name="message" rows="5" class="col-12 p-3">
Code here.
</textarea>
      </div>
    </div>
  </div>
  <!--- End Containter-->
              
            
!

CSS

              
                .form-select, textarea, input {
  border-radius: 12px;
  border: 1px solid #ccc;
  margin: 2px 0px;
}

input {
  padding-left: 5px;
}
              
            
!

JS

              
                import * as bootstrap from "https://cdn.skypack.dev/bootstrap@5.1.0";

var mySelect = document.getElementById("audienceName");

mySelect.onchange = function () {
  var x1 = document.getElementById("description_who");
  var x2 = document.getElementById("description_haveDone");
  var x3 = document.getElementById("description_aboutWhat");
  var x4 = document.getElementById("description_where");
  var x5 = document.getElementById("description_how");
  var x6 = document.getElementById("description_when");

  if (mySelect.value == 1) {
    x1.value = "1";
    x2.value = "1";
    x3.value = "1";
    x4.value = "1";
    x5.value = "1";
    x6.value = "1";
  } else if (mySelect.value == 2){
    x1.value = "2";
    x2.value = "1";
    x3.value = "2";
    x4.value = "2";
    x5.value = "3";
    x6.value = "1";
  }
};

              
            
!
999px

Console