For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
      • Element Presets
      • DOM Elements
      • Strings
      • Components
      • Slots
      • Headings
      • Images
      • Links
      • Forms
        • Get Form Name
        • Set Form Name
        • Get Form Settings
        • Set Form Settings
        • Form Inputs
          • Get Required Field Status
          • Set Required Field Status
          • Get Input Name
          • Set Input Name
          • Get Input Type
          • Set Input Type
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • formInput.setInputType()
ElementsElement Types & MethodsFormsForm Inputs

Set input type

Was this page helpful?
Previous

Styles

Next
Built with

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