# \_areFieldsEqual

Checks if the fields of two chosen Forms are equal

### Parameters

#### form\_a

The ID of the 1st Form.

#### form\_b

The ID of the 2nd Form.

### Example

```
FM_api('Form_areFieldsEqual', [
    'form_a' => '1586980384132',
    'form_b' => '1586980384133'
    ]
);
```

### Results

#### On Failure

If neither "form\_a" or "form\_b" parameters exist or either are below 1:

```
{"error":"missing or invalid parameters: form_a, form_b"}
```

If one of the IDs requested does not match an existing form:

```
{"error":"one of the forms does not exist"}
```

#### On Success

```
{"ok":1,"is_equal":1}
```

If both IDs match valid forms, but they have different fields:

```
"{"error":"fields are not equal","form_a":[{"name":"test field","type":"input","meta":"{\"id\":1586980384132}"},{"name":"subform","type":"subform","extras":{"values":670505},"meta":"{\"id\":1586980384133}"},{"name":"calc","type":"calculation","meta":"{\"calculation_format\":1}"},{"name":"sig","type":"signature"},{"name":"img","type":"image"},{"name":"selectm","type":"select-multiple"},{"name":"select","type":"select"},{"name":"dept","type":"department"}],"form_b":[{"name":"test field","type":"input","meta":"{\"id\":1586980384132}"}]}"
```
