Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

112
Visualizações
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 Respostas
Responde à pergunta

0

Convert the boolean to a string:

value = user.questionBanned.toString()
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda