4

FormData.get is undefined in Chrome

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

enter image description here

user2727195
  • 6,652
  • 16
  • 63
  • 110

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,102
  • 1
  • 9
  • 20
Spencer Wieczorek
  • 20,481
  • 7
  • 40
  • 51
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,000
  • 34
  • 174
  • 243