I.e., variable and tag:

-bool checkboxvalue = false;<br>input(name="nameof_checkbox", required, type="checkbox")

but sometimes (if checkbox_value == true) it should be:

input(name="nameofcheckbox", required, type="checkbox", checked)

(for example, if I show form again and want to help user with values what he entered earlier)

It should always be two differend tags or I can write something like:

input(name="nameofcheckbox", required, type="checkbox" (checkbox_value ? ", checked", "") )

?