# \_new

Creates a new Form Block.

### Parameters

#### name

The name which will be given to the new Form Block.

### Example

```
FM_api('FormBlock_new', [
        'name' => 'new name'
    ]
);
```

### Results

#### On Success

```
{"ok":1,"id":100,"name":"name","type":0}
```

#### On Failure

If the "name" parameter is not set:

```
{"error":"missing or invalid parameter: name"}
```

If the "name" parameter is set but is blank after being trimmed:

```
{"error":"no name returned"}
```

If the "type" parameter has a value higher than 1:

```
{"error":"invalid form_block type supplied"}
```

If a Form Block with the chosen name already exists:

```
{"id":100,"error":"A form or email block with that name already exists"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/formblock/_new.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
