Set input type

formInput.setInputType()

Sets the HTML type of a FormTextInput field.

Supported element:

  • FormTextInput

Syntax

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

Returns

A Promise that resolves to null

Example

// Get the currently selected element
let formTextInput = await webflow.getSelectedElement();
// Set the input type
await formTextInput.setInputType("email");

Designer ability

Designer AbilityLocaleBranchWorkflowSitemode
canEditAnyAnyCanvasAny