React Context Provider

EnterpriseFormBuilderProvider is React context provider that initializes the Enterprise Form Builder Module environment and provides access to Form.io project configuration, license key, and authentication state.

Summary

The EnterpriseFormBuilderProvider wraps your application and provides essential context for all enterprise form builder components and hooks. It automatically loads project information, roles, and sets up the Form.io license key. This provider must be used within a FormioProvider from @formio/react.

Props

Prop
Type
Required
Description

licenseKey

string

Yes

Your Form.io enterprise license key

tag

string

Yes

Tag used to filter forms and resources

children

ReactNode

Yes

Child components that will have access to the form builder context

Usage Example

import { EnterpriseFormBuilderProvider } from '@formio/enterprise-form-builder-react';
import { FormioProvider } from '@formio/react';

function App() {
  return (
    <FormioProvider 
      projectUrl="https://your-project.form.io" 
      baseUrl="https://your-project.form.io"
    >
      <EnterpriseFormBuilderProvider 
        licenseKey="your-license-key"
        tag="common"
      >
        {/* Your application components */}
      </EnterpriseFormBuilderProvider>
    </FormioProvider>
  );
}

Last updated

Was this helpful?