dimanche 6 juin 2021

using ejs to change checkbox checked state to false

is it possible to change the checked state of a checkbox to false using EJS? The problem is

checked = "false"

will still leave the checkbox checked. i am hoping to change the checked attribute via EJS, by passing a boolean from an array (EJSCHECKED), which crosschecks against my mongoose database.

checked = <%- EJSCHECKED[i] %>

i intend for the box to remained checked or unchecked upon the reloading of a page.




Aucun commentaire:

Enregistrer un commentaire