Set Form Name

FormForm.setName(name)

Sets the name of the form.

Syntax

form.setName(name: string): Promise<null>

Parameters

  • name: String - The name of the form.

Returns

Promise<null>

A Promise that resolves to null.

Example

const selectedElement = await webflow.getSelectedElement()
if (selectedElement?.type === 'FormForm' || selectedElement?.type === 'FormWrapper'){
await selectedElement.setName("My Form")
} else {
console.log("Selected Element is not a Form Element")
}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canEditAnyAnycanvasAny