If you’re upgrading from Portal 3, check out the Upgrade Guide.

Parameters

workbook
Workbook

The workbook parameter takes a Flatfile Workbook.

Usage

You can simply attach any existing workbook configuration you have to a listener and it’ll automatically apply to your next Space.

install
npm i @flatfile/plugin-dxp-configure
import
import { dxpConfigure } from "@flatfile/plugin-dxp-configure";
import { MyWorkbook } from './my-dxp-workbook.js'
import { dxpConfigure } from '@flatfile/plugin-dxp-configure'

export default (listener) => {
  listener.use(dxpConfigure(MyWorkbook))
}
my-dxp-workbook.js
import { Sheet, TextField, Workbook } from "@flatfile/configure";

export const MyWorkbook = new Workbook({
  name: "My Workbook",
  namespace: "test",
  sheets: {
    mySheet: new Sheet("Test", {
      name: TextField("Full Name"),
      email: TextField({
        label: "Email Address",
        compute: (val) => {
          return val.toLowerCase();
        },
      }),
    }),
  },
});

See the code