Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
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 Respuestas
Responde la pregunta

0

Convert the boolean to a string:

value = user.questionBanned.toString()
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda