> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get input type

> Retrieves the type of the input field.

## `formInput.getInputType()`

Retrieves the HTML type of a FormTextInput field.

Supported element:

* `FormTextInput`

#

### Syntax

```typescript
formInput.getInputType(): Promise<'text' | 'email' | 'password' | 'tel' | 'number' | 'url' | null>;
```

### Returns

**A Promise resolving to a string or null**

Returns the HTML type of the `FormTextInput` element (`'text'`, `'email'`, etc.). Returns `null` if the type isn't found.

#

### Example

```typescript
// Get the currently selected element
let formTextInput = await webflow.getSelectedElement();

// Get the input type
let type = await formTextInput.getInputType();

console.log(type); // e.g., "email"
```

### Designer ability

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | Any    | Any    | Any      | Any      |