There seems to be a bug in how preserveData is handling checkboxes. I have
noticed that if CFFORM.preserveData is set to True and
FORM.SomeCheckBoxGroupName is defined, all checkboxes in the
SomeCheckBoxGroupName group are checked, even if it is set to the empty string.
The one exception to this is if there is only one checkbox in the name group.

This means both that all checkboxes in SomeCheckBoxGroupName are checked
whether data is posted to a form with checkbox group SomeCheckBoxGroupName in
it or if CFPARAM or the like is used to initialize FORM.SomeCheckBoxGroupName
to anything.

Has anyone else encountered this or has possible fixes/workarounds? We
specifically need to be able to post from a form to itself and have the
filled-in data still filled-in (not a problem save with the checkboxes).

This was not the case in ColdFusion 6.1 (using the same code) and I can't find
a woraround given the change in ColdFusion MX where the CHECKed attribute is
ignored if preserveData is set to True.

Attached is a simple example with two checkboxes and preserveData set to True.
If you check neither of the checkboxes and Submit the form, they remain
un-checked, but if you check either of the two, both become checked, even
though the checkbox variable only shows one having been checked.

Thanks very much.
James Fraumeni

<h3>cfform Example</h3>
<!--- If Form.oncethrough exists, the form has been submitted. --->
<cfif IsDefined("Form.oncethrough")>
<h3>Posted to self</h3>
</cfif>

<cfform name="cfformexample" preservedata="True" method="POST">
<h4>This example displays checkbox input type for cfinput.</h4>
Checkbox FORM variable is:
<cfif IsDefined("Form.chkTest2")>
<cfoutput>#FORM.ChkTest2#</cfoutput>
<cfelse>NOT DEFINED</cfif> <BR>
Yes <cfinput type = "Checkbox" name = "ChkTest2" value = "Yes"><BR>
Mebbe <cfinput type = "Checkbox" name = "ChkTest2" value = "Mebbe"><BR>
<p><cfinput type = "submit" name = "submit" value = "show me the result">
<cfinput type = "hidden" name = "oncethrough" value = "Yes"></p>
</cfform>