Form.io Lazy Load Renderer

by brendanbond

HTML

<script src="https://cdn.form.io/js/formio.embed.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<div id="formio"></div>

JavaScript

const url = 'https://file-examples.com/wp-content/storage/2017/02/file_example_XLS_10.xls'

const options = {
  mode: "no-cors"
};
/* fetch(url, options)
  .then(res => res.blob())
  .then(blob => {
    console.log(blob);
    var file = window.URL.createObjectURL(blob);
    window.location.assign(file);
  });
 */
 
 Formio.request(url);