Form submission
1. Enable Form Submission
const dispatcher = new Dispatcher({
catchForms: true
});2. Define Routes
// POST: example.se/#post/contact
router.post('/post/contact', function(vars, request, path) {
console.log('Contact form posted with form request:', request.post);
});3. Implement Form Submission
<form action="#post/contact" method="post">
<div>
<label>First name</label>
<input type="text" name="firstname" value="">
</div>
<div>
<label>Last name</label>
<input type="text" name="lastname" value="">
</div>
<div>
<label>E-mail</label>
<input type="email" name="email" value="">
</div>
<input type="submit" name="submit" value="Send">
</form>Have any questions
Last updated