I am trying to create a form with several checkboxes. I want each checkbox to share the same name, and the values of the ones checked off to be submitted with the form. I know that this can be done with PHP (see this SO question) but I can't figure out how to do it with Node.js and Express. Here's a modified version of my HTML:
<label><input type="checkbox" name="section[]" value="1" />Item Name</label>
<label><input type="checkbox" name="section[]" value="2" />Item Name</label>
<label><input type="checkbox" name="section[]" value="3" />Item Name</label>
When I handle the POST request, I've tried accessing the values with both req.param('section')
and req.param('section[]')
but they both return undefined.