Init form

Initialize a Form instance bound to a board item

Initializes and returns a Form instance bound to a board item, fetching its schema and data in one call. This is the recommended way to build a custom form UI for board items.

Custom components only

initForm is available only in custom components (kf.app from the client SDK). It is not exposed in the Low-code / No-code (Run Script) SDKs.

Parameters

ParametersTypeDescription
instanceIdStringOptional. If omitted, a new board item is created.
viewIdStringOptional. Scopes the form's schema/permissions to a specific view.

Syntax

// Create a new board item
const form = await boardInstance.initForm();
await form.updateField({ itemType: "New Item" });

// Edit an existing board item
const form = await boardInstance.initForm("item_123");
const data = await form.toJSON();

Returns

Returns a Form instance.

On this page