Reputation: 6824
I'm trying to understand pretty basic things but seems I'm lost trying to get form field value in onSave function. I have one field in form only <input name='content'>
_onSubmit: function(e) {
e.preventDefault();
var content = e.content.value;
but it respond in console with TypeError: e.content is undefined
Upvotes: 0
Views: 1800
Reputation: 305
You can get input's value using
e.target.value
Or
e.preventDefault()
let value = document.getElementById("myinput").value;
let valu2 = document.getElementById("myinput2").value;
...
Upvotes: 1