> 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.

# Set Required Status

> Sets the required status of a form input.

## `formInput.setRequired(value)`

Sets the required status of a form input.

This method is applicable to the following form input types:

* `FormCheckboxInput`
* `FormFileUploadWrapper`
* `FormRadioInput`
* `FormSelect`
* `FormTextarea`
* `FormTextInput`

## Syntax

```typescript
formInput.setRequired(value: boolean): Promise<null>
```

## Parameters

* `value`: *Boolean* - The required status of the form input.

## Returns

**Promise\<`null`>**

A Promise that resolves to `null`.

## Example

```typescript
const selectedElement = await webflow.getSelectedElement()

const formInputTypes = [
  'FormCheckboxInput',
  'FormFileUploadWrapper',
  'FormRadioInput',
  'FormSelect',
  'FormTextarea',
  'FormTextInput'
];

if (selectedElement?.type && formInputTypes.includes(selectedElement.type)) {
  await selectedElement.setRequired(true)

} else {
  console.log("Selected Element is not a Form Input Element")
}
```

## Designer Ability

| Designer Ability | Locale | Branch | Workflow | Sitemode |
| :--------------- | :----- | :----- | :------- | :------- |
| **canEdit**      | Any    | Any    | canvas   | Any      |

```
```