I have a simple form.
It POSTs to the server (node js / express), and has a checkbox with a 'true' value when checked.
<form id="demo_form" action="/submit_demo" method="POST">
<input type="checkbox" id="demo_input" name="demo_input" value=true />
</form>
When I receive the data on the server, my values are wrapped in quotes - eg. "true".
This causes issues when submitting data to my api which strictly accepts booleans as true (no quotes).
I can easily manually remove the quotes from any data before submitting to my api BUT it gets a bit painful when dealing with a lot of fields.
Is there a simple solution to sending a boolean value from a form to a server without it being a string?
Any input much appreciated :)