# \_setFieldImage

Sets the Image of a Field within a Job Form.

### Parameters

#### jpeg

The base64 data of the image to be set.

#### id

The ID of the Job.

#### name

The name of the Form Field to set an image to.

### Example

```
FM_api('Job_setFieldImage',[
    'jpeg'=>'data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAANCAYAAABPeYUaAAAAdUlEQVR42rWS6w3AIAiEIWGSDtehOlxXoekDFXz0TFr+Kebz7kCISKldTGDJoKcoOEPWxXe2vQdmXMkJNZB9cJ8rkDwXej0o1USABzuQ0AclQA49m0nNu5ISbNYCSICd0GFOYCZcAYPt2WC5sYj6w3TmFCU1B1lyJCTX7HJyAAAALXRFWHRTb2Z0d2FyZQBieS5ibG9vZGR5LmNyeXB0by5pbWFnZS5QTkcyNEVuY29kZXKoBn/uAAAAAElFTkSuQmCC',
    'id'=>'772025',
    'name'=>'test field name'
  ]
);
```

#### On Success

```
{"ok":1,"val":"{\"src\":\"92447x1774198864066.jpg\"}"}
```

#### On Failure

If the "jpeg" parameter is not set:

```
{"error":"no jpeg parameter supplied"}
```

If the "id" parameter is not set or has an integer less than 1:

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

If the "name" parameter does not have a value when trimmed:

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

If the "id" parameter does not match an existing job:

```
{"error":"job does not exist"}
```

If the job form does not have a field which matches the "name" parameter:

```
{"error":"no field by that name exists in the job's form"}
```
