@eduzz/form-builder
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

Eduzz Form Builder

Form builder viewer

How to use

Generate a access token (Backend)

axios.post('https://formbuilder-api.eduzz.com/v1/auth/generate-access', {
    "account": "your-account",
    "secretKey": "your-secret-key",
    "formRef": "form-ref",
    "clientReference": "client-who-will-answer-ref",
    "tags": ["some-tag"] // <~ optional
  }, {
    headers: { 'Accept': 'application/json', "Content-Type": "application/json" }
  }
})

Via Browser

(function (d, l, c) {
  var s = d.createElement('script');
  s.async = true;
  s.src = l;
  s.onload = c;
  d.body.append(s);
})(document, 'https://unpkg.com/@eduzz/form-builder@^1.0.0/build/widget.js', function () {
   window.EduzzFormBuilder({
    accessToken: "...",
    element: document.getElementById('content'), // optional, if not provided a modal will be opened
    onCompleted: (result, event) => { console.table({ event, result }) },
    extra: { firstName: 'Teste', lastName: 'Form', email: 'teste@teste.com' } // optional, only necessary for integration
  });
});

Via npm

import EduzzFormBuilder from '@eduzz/apps-toolbar';

EduzzFormBuilder({
  accessToken: "...",
  element: document.getElementById('content'), // optional, if not provided a modal will be opened
  onCompleted: (result, event) => { console.table({ event, result }) }
});

Dependencies (0)

    Dev Dependencies (30)

    Package Sidebar

    Install

    npm i @eduzz/form-builder

    Weekly Downloads

    17

    Version

    1.0.9

    License

    none

    Unpacked Size

    868 kB

    Total Files

    10

    Last publish

    Collaborators

    • luanlmd
    • vitorvmrs
    • miguelaugl
    • danieloprado
    • jonathasprodrigues
    • caferrari