Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
why does pug template fails to address a specific field of an object by name?

this is what my pug file looks like:

                input(type='hidden' value=user)
                input(type='hidden' value=user.questionBanned class='questionbanneduser')
                input(type='hidden' value=user.username name='username')

i am passing the object user and then reading the value of questionBanned and username, however in the html file this is how it looks: enter image description here

as you can clearly see an object is passed into the first input which behaves correctly, and the last input reads the object correctly and its value is correct and the username, however the value of the second input is empty? it is supposed to say true, since as you see in the object user the field "questionBanned" is true.

what am I doing wrong? is it forbidden to use boolean values or am I rading it wrongly?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Convert the boolean to a string:

value = user.questionBanned.toString()
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!