diff --git a/files/en-us/web/api/formdata/entries/index.md b/files/en-us/web/api/formdata/entries/index.md index 71cd4ed75f41d93..ff88957bad9da72 100644 --- a/files/en-us/web/api/formdata/entries/index.md +++ b/files/en-us/web/api/formdata/entries/index.md @@ -10,6 +10,9 @@ browser-compat: api.FormData.entries The **`FormData.entries()`** method returns an [iterator](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) which iterates through all key/value pairs contained in the {{domxref("FormData")}}. The key of each pair is a string, and the value is either a string or a {{domxref("Blob")}}. +> [!NOTE] +> Unlike [`Map`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) entries, `FormData` entries are not necessarily unique by key. A form can contain multiple elements with the same name, so the same key may appear in more than one pair while iterating. To retrieve all values associated with a single key, use the {{domxref("FormData.getAll()", "getAll()")}} method (or {{domxref("FormData.get()", "get()")}} for only the first value). + ## Syntax ```js-nolint diff --git a/files/en-us/web/api/formdata/keys/index.md b/files/en-us/web/api/formdata/keys/index.md index 09a273885fe9ebf..51e2e8c787359a9 100644 --- a/files/en-us/web/api/formdata/keys/index.md +++ b/files/en-us/web/api/formdata/keys/index.md @@ -10,6 +10,9 @@ browser-compat: api.FormData.keys The **`FormData.keys()`** method returns an [iterator](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) which iterates through all keys contained in the {{domxref("FormData")}}. The keys are strings. +> [!NOTE] +> Unlike [`Map`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) keys, `FormData` keys are not necessarily unique. A form can contain multiple elements with the same name, so the same key may appear more than once while iterating. To retrieve all values associated with a single key, use the {{domxref("FormData.getAll()", "getAll()")}} method (or {{domxref("FormData.get()", "get()")}} for only the first value). + ## Syntax ```js-nolint diff --git a/files/en-us/web/api/formdata/values/index.md b/files/en-us/web/api/formdata/values/index.md index a422cd53c0f9c4f..92105aa21553b12 100644 --- a/files/en-us/web/api/formdata/values/index.md +++ b/files/en-us/web/api/formdata/values/index.md @@ -10,6 +10,9 @@ browser-compat: api.FormData.values The **`FormData.values()`** method returns an [iterator](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) which iterates through all values contained in the {{domxref("FormData")}}. The values are strings or {{domxref("Blob")}} objects. +> [!NOTE] +> `FormData` keys are not necessarily unique. A form can contain multiple elements with the same name, so values sharing one key each appear while iterating. To retrieve all values associated with a single key, use the {{domxref("FormData.getAll()", "getAll()")}} method (or {{domxref("FormData.get()", "get()")}} for only the first value). + ## Syntax ```js-nolint