formio / formio.js

JavaScript powered Forms with JSON Form Builder

Home Page:https://formio.github.io/formio.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formio.builder is not a function Error

priya30m opened this issue · comments

I am trying to get my custom component included in formio builder navigation bar.
I am using below code, however Formio.builder is giving error - Uncaught TypeError: Formio.builder is not a function"

Is there anything missing?

<link rel="stylesheet" href="https://cdn.form.io/js/formio.full.min.css">
<script src="https://cdn.form.io/js/formio.full.min.js"></script>
<div id="builder"></div>
Formio.builder(document.getElementById('builder')
...
...
)

Ran into same problem. I think they haven't updated the documentation. This worked for me using npm package, might work for CDN too.

import { FormBuilder } from "formiojs";
new FormBuilder(document.getElementById('builder'), {}, {});