Set input type

formInput.setInputType()

Sets the HTML type of a FormTextInput field.

Supported element:

  • FormTextInput

Syntax

1formInput.setInputType(type: 'text' | 'email' | 'password' | 'tel' | 'number' | 'url'): Promise<null>;

Returns

A Promise that resolves to null

Example

1// Get the currently selected element
2let formTextInput = await webflow.getSelectedElement();
3
4// Set the input type
5await formTextInput.setInputType('email');

Designer ability

Designer AbilityLocaleBranchWorkflowSitemode
canEditAnyAnyCanvasAny