VanillaJS Form.io Renderer
by brendanbond
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.form.io/formiojs/formio.full.min.css">
<script src="https://cdn.form.io/formiojs/formio.full.min.js"></script>
<div class="page-content">
<div class="container-fluid">
<div id="app" class="myClass"></div>
</div>
</div>
JavaScript
import "bootstrap5" from '@formio/templates';
Formio.use({
...bootstrap5,
button: {}
});
Formio.createForm(document.getElementById("app"), formDef, {}).then((form) => {
form.submission.metadata['myCustomMetadata'] = "hello, world";
})