pug - How can I submit boolean value with a checkbox in form in Jade? -


i using jade templates in nodejs.

i want send values of checkbox.

            input#isnewproduct.checkbox(type='checkbox', name="isnewproduct", checked=product.isnewproduct) 

but sends true in form.

where wrong?

try this:

checked=(product.isnewproduct || undefined) 

Comments