I got a problem when using the serialize() jQuery function:
<form role="form" id="enter-image-detail-form" method="post">
<div class="form-group">
<input type="text" class="form-control" id="image-name" placeholder="Enter image name" value="test">
</div>
<button type="submit" class="btn btn-default btn-success btn-block">Save</button>
</form>
$('body').on('submit', '#enter-image-detail-form', function(e){
console.log( $(this).serialize() );
e.preventDefault();
});
It returns an empty string. Thanks in advance.