<%doc> A tristate checkbox (with three values: true, false, and null). Internally, this creates a checkbox, coupled via javascript to a hidden field that actually contains the value. For now, the only values these can have are 1, -1, and empty. Clicking the checkbox cycles between them. For compatibility with regular checkboxes, empty is the false state and -1 is the indeterminate state. Displaying these is a problem. "indeterminate" is a standard HTML5 attribute but some browsers display it in unhelpful ways (e.g. Firefox slightly grays the checkbox, approximately #dddddd), and checkboxes ignore nearly all CSS styling. <%shared> my $init = 0; % if ( !$init ) { % $init = 1; % } # end of $init