> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/form/_arefieldsequal.md).

# \_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}"}]}"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/form/_arefieldsequal.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.
