FormForm.setName(name)

Sets the name of the form.

Syntax

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

Parameters

  • name: String - The name of the form.

Returns

Promise<null>

A Promise that resolves to null.

Example

1const selectedElement = await webflow.getSelectedElement()
2
3if (selectedElement?.type === 'FormForm' || selectedElement?.type === 'FormWrapper'){
4
5 await selectedElement.setName("My Form")
6
7} else {
8 console.log("Selected Element is not a Form Element")
9}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canEditAnyAnycanvasAny
Built with