2
Noone? OK, here is the complete crappy solution (even with jquery):
$xoTheme->addScript(null, array('type' => 'text/javascript', 'charset' => _CHARSET), '
$(document).ready(function() {
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="none";
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="none";
$("#timeset").click(function(){ if( $("#timeset").is(":checked")) {
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="table-row";
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="table-row"; } else {
document.getElementById("xoops_date[appear[date]]").parentNode.parentNode.style.display="none";
document.getElementById("xoops_date[vanish[date]]").parentNode.parentNode.style.display="none"; } }); }); ');
The first lines we need, because there is no way to identify the table row to make it initially invisible, because it looks like this:
<tr valign="top" align="left"><td class="head">
With the click on a checkbox the table rows will vanish. Another click shows them again.
But we have always to climb up the "dom-ladder" with parentNode.parentNode.
I praise the day we are getting rid of the table based xoopsform.