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

+ 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.


                <!-- standard Form embed -->
<script src="//"></script>
<form id="mktoForm_1389"></form>
<script>MktoForms2.loadForm("//", "410-XOR-673", 1389);</script>
<!-- /standard Form embed -->



.mktoTemplateBox input[type="checkbox"] { 
    margin-right: 4px !important;
.mktoTemplateBox select {
    margin-left: 4px !important;
.mktoTemplateBox select option {
    font-family: Arial;


                // includes code from [MktoForms2 :: KV HTML reenable Forms API onSubmit event](

 * Reroute KV HTML submissions via Marketo submit()
 * @author Sanford Whiteman, TEKNKL
 * @version v1 2021-05-02
 * @copyright © 2021 Sanford Whiteman
 * @license Hippocratic 2.1: This license must appear with all reproductions of this software.
  const formEl = mktoForm.getFormElem()[0],
      kvTemplate = formEl.querySelector(".mktoTemplateBox");
  let kvSubmitButtonEl;
  if (kvTemplate) {
    kvSubmitButtonEl = kvTemplate.querySelector(".mktoTemplateBox button[type='submit']");   
        try {
        } catch(err) { /* swallow harmless DOM error */ }

 * Add inputs in KV HTML as hidden fields
 * @author Sanford Whiteman, TEKNKL
 * @version v1 2021-09-24
 * @copyright @ 2021 Sanford Whiteman
 * @license CCO
 * Deliberately does not support all form field types in this simple example.
 * Types not implemented throw (caught) exceptions:
 *   <select type=select-multiple>
 *   <input type=radio>
 * Implemented types:
 *   <input type=checkbox> - treated as Marketo `Checkbox` (not `Checkboxes`) field type
 *   <input> of any other type - treated as <input type=text>
 *   <select type=select-one>
 *   <textarea>
   const arrayify =[].slice);
   // coercer functions for Forms 2.0-like values
   const mktoValueCoercer = {
     "INPUT,checkbox" : function(input){ return input.checked ? "yes" : "no" },
     "INPUT,radio" : function(input){ throw TypeError("Input type not implemented.") },
     "INPUT" : function(input){ return input.value },
     "SELECT,select-one" : function(input){ return input.value },
     "SELECT,select-multiple" : function(input){ throw TypeError("Input type not implemented.") },
     "TEXTAREA" : function(input){ return input.value }
      const formEl = mktoForm.getFormElem()[0];

      let kvHTMLClientInputs = formEl.querySelectorAll(".mktoTemplateBox input, .mktoTemplateBox select, .mktoTemplateBox textarea");
      let mktoFieldsObj = arrayify(kvHTMLClientInputs)
      .reduce(function(acc, input){
        let coercer = mktoValueCoercer[[input.tagName,input.type]] || mktoValueCoercer[[input.tagName]];
        try {
           acc[] = coercer(input);
        } catch(e) {
           console.log(input, e);
        return acc;
      }, {});