I'm using Jade with express and node.js to create a frontend for a database of flight logs as part of my training. I have confirmed my inputs have names, that my body parser is set to application/json, and that my routes appear after my middleware declarations, yet my req.body object remains undefined. My question is why. Here is one field in my jade form:
.row.col-sm-16
div.input-group.form-control
form(action='',method='POST')
div(data-role='fieldcontain')
fieldset(data-role='controlgroup')
label(for='HobbsOut') HobbsOut      
input(id='HobbsOut',type='text',value='',placeholder='hobbs in generated',name='HobbsOut')
Everything below the gap is repeated for each field. The submit button:
div.text-center
button.btn.btn-default.input-group-button Submit
The button div is aligned with 'data-role' divs. The relevant route:
app.post('/logadd', ctrl.addFlight);
And the relevant controller:
module.exports.addFlight = function (req, res) {
console.log(req.body.HobbsOut);
res.redirect('/loglist');
};
Currently I'm simply trying to print the first field and redirect the user to the flight log. I'm having this problem in more than one application. It is imperative I know how to push user input into a database. Any and all help is greatly appreciated.