4

FormData.get is undefined in Chrome

https://developer.mozilla.org/en-US/docs/Web/API/FormData/get

enter image description here

user2727195
  • 7,122
  • 17
  • 70
  • 118

2 Answers2

8

By default, Chrome does not support the .get() method, as well as delete, get, getAll, has, and set. Although you can enable that functionality by activating an experimental flag, note from MDN:

[2] Chrome support for methods other than append is currently behind the "Enable Experimental Web Platform Features" flag.

For activating flags in Chrome you can go to the following link:

chrome://flags/#enable-experimental-webkit-features
fingeron
  • 1,152
  • 1
  • 9
  • 20
Spencer Wieczorek
  • 21,229
  • 7
  • 44
  • 54
1

The answer is this: FormData appeared long ago, but not everyone has updated the software ... so Chrome 49.0 pops up somewhere ... or some mobile browsers.

Solution: use other methods of collecting and submitting the form like jquery or https://stackoverflow.com/a/11661219/12972080.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253