# \_setImage

Sets the image that a Form Block will use.

### Parameter

#### id

The ID of the Form Block to be deleted.

### Example

```
FM_api('FormBlock_setImage',[
    'id'=>'30002',
    'Filedata'=>'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='
    ]
);
```

### Results

#### On Success

```
{"ok":1,"now":1732458806,"img":"\/f\/92447\/formblocks\/30002.png"}
```

#### On Failure

If the "id" parameter is not set or has a value less than 1:

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

If the "Filedata" parameter is not set:

```
{"error":"missing parameter: Filedata"}
```

If the "id" parameter does not match the ID of an existing Form Block:

```
{"error":"no such form block"}
```


---

# 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/_setimage.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.
