Set App Connection

element.setAppConnection()

Enables the connection between an element and an App.

Supported Elements

App Connections supports the following elements: Image, FormForm, and FormWrapper.

Syntax

element.setAppConnection(value: string): Promise<null>

Parameters

  • value: string - An identifier for specific element-App connection.

Returns

Promise<null>

A Promise that resolves to null.

Example

const el = await webflow.getRootElement(); // Get Root Element
// Check for an element
if (!el || !el.children) throw new Error("Expected an element");
// Append a form element to the root element
const formEl = await el.append(webflow.elementPresets.FormForm);
// Check for App Connection support
if (!formEl || !formEl.appConnections) {
throw new Error("App Connections not supported");
}
// Set App Connection
await formEl.setAppConnection("myAwesomeAppManageFormElement");

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny