Sending form text input to console.log for testing
javascript
Solution
var nameInput = document.getElementById('name');
document.querySelector('form.pure-form').addEventListener('submit', function (e) {
//prevent the normal submission of the form
e.preventDefault();
console.log(nameInput.value);
});
Problem
I have a simple form with one text field for testing. I need to have the info the user types in sent to console.log for now. Is this possible and if so what would I write? ``` <form class="pure-form"> <input id="name" type="text" placeholder="Enter Name" /> <button type="submit"><i class="fa fa-chevron-circle-right"></i></button> </form> ```