Leveragename
Previously, I advised against usingname as it's mostly just clutter. But, now, we will actually want to use it. So, make sure that all of yourinputs have anameattribute. Or, just usethis Gist (includes HTML and CSS.
FormData
We simply pass our form into thisconstructorconst myFormData = new FormData(form). However, if youconsole.log(myFormData) - it's just empty.
Don't fret. Read on.
There are many points regardingFormData anditerables covered inthe docs.
The purpose of this post is to show how to convert your 'form data' into anobject.
Object.fromEntries
Again,the docs contain more details and examples. All we need to know is that ourFormData can be turned into anobject literal like so:Object.fromEntries(myFormData). That's it.
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse




