element.setAppConnection()

Enables the connection between an element and an App.

Supported Elements

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

Syntax

1element.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

1const el = await webflow.getRootElement(); // Get Root Element
2
3// Check for an element
4if (!el || !el.children) throw new Error("Expected an element");
5
6// Append a form element to the root element
7const formEl = await el.append(webflow.elementPresets.FormForm);
8
9// Check for App Connection support
10if (!formEl || !formEl.appConnections) {
11 throw new Error("App Connections not supported");
12}
13
14// Set App Connection
15await formEl.setAppConnection("myAwesomeAppManageFormElement");

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny