JSFiddle - React, Tailwind, and code Playground

by brendanbond

HTML

<link rel="stylesheet" href="https://cdn.form.io/formiojs/formio.full.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.form.io/formiojs/formio.full.min.js"></script>
<div class="container">
  <p>
    Here, I've added a button component that performs a custom action.
  </p>
  <div id="formio"></div>
</div>

JavaScript

Formio.createForm(document.getElementById('formio'), "https://examples.form.io/example", {hooks: {
    beforeSubmit: (submission, next) => {
      console.log("Hello, world!")
      
      // Only call next when we are ready.
      next();
    }
  }});

function myCustomThing() {
  alert("Custom submit button pressed!");
}