I have several forms that have check boxes. I set the vales of the
checkboxes to sessions after the form is submitted so that a user can surf
around the site and come back and change their selections. The code I use is
below and it sort of works - but not really. Its checks to see if the value
is in the session and checks the box if it is. The problem is if someone
unchecks all the boxes and hits submit. Though the box was unchecked by the
user the code below says it was and hence one value always gets posted back
to the session and it resets itself and checks a box.  

<cfif #trim(session.fstate)# contains #trim(stateabbr)#>
<input type="Checkbox" name="fstate" value="'#trim(stateabbr)#'"
checked>#state#<br>
<cfelse>
<input type="Checkbox" name="fstate" value="'#trim(stateabbr)#'">#state#<br>
</cfif>
</cfoutput>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235770
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to