Skip to main content

All Questions

Tagged with
0 votes
0 answers
27 views

pass form value in PUG as a paramater in onclick function

I am trying to pass a value from a form to use as a parameter in a function in a onclick button. But im not sure how to get the value. This hardcoded example works: button.btn.btn-glider(onclick=...
user6086008's user avatar
1 vote
0 answers
28 views

How to retrieve the data from a Jade form - Node.js

I have a Jade web page with a form in it. I would like to retrieve the data collected with this form using Node.js. Here is my Jade code: doctype html html head title= userCreation link(...
Flantier's user avatar
0 votes
1 answer
1k views

How to collect input from a form using node and pug

very new to Node.js and pug, I'm trying to collect form info and store it in a variable to be used elsewhere. Here's my form: form(id="cityForm" action="/courses" method="POST&...
DylanB's user avatar
  • 119
0 votes
1 answer
277 views

PugJS form POST with empty body data {} when submitting

I have a Pug file with a simple login form: form(name='signup' action='/auth/signup' method='post') .form-floating.mb-3 input#emailInput.form-control(type='email' placeholder='[email protected]') ...
Eduardo Remor's user avatar
0 votes
1 answer
393 views

How to enforce a select dropdown choice

I have a PUG template with this code: select#categoryDropdown(name='category', required) option(value='none', selected, disabled, hidden) -- Select an option -- option(value='school') school ...
emonigma's user avatar
  • 4,166
0 votes
1 answer
41 views

Why does every field in my form act as a submit?

For some reason whenever I test this code and try to edit a field, it acts like I hit the "save listing" button. I've tested commenting out the if statements and file upload to see if it was ...
Simca's user avatar
  • 71
0 votes
1 answer
58 views

Can't get the value of an form input

I am using a pug template to expose an array of objects, formatted as a table. Here is the pug template: each trans,index in property.transactions .tr ...
Bmurphy's user avatar
  • 64
0 votes
1 answer
59 views

Form Validation stays stuck on error Statement

So im validating some passwords with simple JS. i have an if statement if pw don't match add some css. But when i go back in the form and change the pw to match the errors stay no matter what. i added ...
David Verduzco's user avatar
0 votes
0 answers
110 views

Node Module.export and GET to display search results from form

I'm really struggling with routing in express, specifically returning a module.export to a res.render function but I have tried every which combination of GET, POST, :q, results/, req.params, req.body ...
ZADorkMan's user avatar
  • 301
0 votes
1 answer
468 views

textarea generated by pug has cursor starting in the middle

I'm creating a form with Pug and in the resulting textarea the cursor starts in the middle instead of the top left. I've seen similar questions where the issue was whitespace between the opening and ...
Paul McDowell's user avatar
-1 votes
1 answer
161 views

Not getting the from data from PugJS form in NodeJs

I am trying to add an authentication form where users enter their credentials and if their credentials are correct, I want to redirect them to a route. So, I have created a middleware login.js, which ...
Raghav Sharma's user avatar
0 votes
1 answer
451 views

How to use form select value to action method (without query)

I'm using pug to render some pages for my nodeJS server. In this case I'm trying to use the value captured in the form select in order to change the action method. So, the idea is use the group name ...
Pedro Lima's user avatar
0 votes
1 answer
105 views

JS searchbox submit not sending values - return undefined or [Object,Object]

Why doesn't this form submit send the input values as expected? I am using PUG templating and I can return desired result by doing http://localhost:3000/search/searchValue (searchValue being a search ...
ZADorkMan's user avatar
  • 301
0 votes
1 answer
69 views

express server cannot accept html form post

Every time I try to make a post to my server, for some reason the browser shows me this message: "Cannot POST /" and I am not sure why. I would appreciate some insight. PUG CODE: doctype html html ...
Brian T Brennglass's user avatar
0 votes
1 answer
575 views

How to link form data to a GET route

I am pretty sure I am royally messing this up but I am stuck, and have no choice but to ask. I have this simple pug form: form(id="searchForm", action="/search" method="POST") input(type="...
TylerP3358's user avatar

15 30 50 per page