Yes, it took some hacking of the main class file. For some reason all of the code to "remember" the selected/checked settings were buried in a conditional; I just copied the relevant lines of code to just below the closing brace of the conditional so that the "remembering" code would execute all the time. For example, the block of code beginning at line 2123:
if ($type == 'checkbox')
{
$ph = '';
$ph .= '<label for="'.$DOMid.'" id="'.$DOMid.'Label"><span>'.$label."</span>\n";
$options = explode(',', $values);
foreach ($options as $eachOption)
{
$option = explode('(', $eachOption);
$option = str_replace(')', '', $option);
if (isset($CurrentUser[$name]))
{
if ($CurrentUser[$name] == 'on')
{
$ph .= $option[0].' <input type="checkbox" id="'.$DOMid.'" name="'.$name.'" checked="checked" />'."\n";
}
else
{
$ph .= $option[0].' <input type="checkbox" id="'.$DOMid.'" name="'.$name.'" />'."\n";
}
}
else if($_POST[$name] == "on")
{
$ph .= $option[1].' <input type="checkbox" id="'.$DOMid.'" name="'.$name.'" checked="checked" />'."\n";
}
else
{
$ph .= $option[0].' <input type="checkbox" id="'.$DOMid.'" name="'.$name.'" />'."\n";
}
}
$ph .= '</label>'."\n";
// Set the Placeholder
$modx->setPlaceholder('form.'.$name, $ph);
}
Got this stuck in right after the if (isset($CurrentUser[$name])) conditional. I did this wherever I could find any checks for the status of checkboxes; being in something of a hurry to get something into production I haven’t had the chance to go back and really go over the whole class file and fix it all.
else if($_POST[$name] == "on")
{
$ph .= $option[1].' <input type="checkbox" id="'.$DOMid.'" name="'.$name.'" checked="checked" />'."\n";
}