I have a database table with a "boolean" column that can be either true, false or null. Three possible "values".
Now I'm trying to make a HTML interface to edit that table.
According to my knowledge, a HTML input
of type
checkbox
can only be "set" (true) or "not set" (false/null). It's ambiguous as to whether an unchecked checkbox means "false" or "null".
Perhaps this has recently changed with some fancy new HTML 5 stuff? If not, how should I solve this which doesn't resort to some clunky "hack" such as having a select
with the three options?
pgAdmin 4, the browser-based PostgreSQL editor, has some kind of custom JavaScript thing (I believe), which I'd like to avoid. It allows me to click several times to cycle between "checked", "unchecked" and "null". Is that possible in pure HTML?
Aucun commentaire:
Enregistrer un commentaire