formInput.setName(name)

Sets the name of the input field.

This method supports the following FormInput elements:

  • FormCheckboxInput
  • FormFileUploadWrapper
  • FormRadioInput
  • FormSelect
  • FormTextarea
  • FormTextInput

Syntax

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

Returns

A Promise that resolves to null

Example

1// Get the currently selected element
2let formInput = await Webflow.getSelectedElement();
3
4// Set the name of the input field
5await formInput.setName("Email");

Designer ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny
Built with