June 17, 200520 yr On one of our site there is an a field that we apply a value list to in the form of checkboxes. In this case there is only one value in the value list. so either they can check it or uncheck it. The problem is if they do not check anything and the box is previously checked the database will not update the field with nothing. In other words if there was something in the field (so the box is currently checked) and they uncheck the box (so now there are no boxes checked at all) and submit the form, the database will not erase what is in the field and make it blank. Any thoughts on why this is? Thanks, Nick
June 18, 200520 yr That's difficult to comment without any code snippet. You might consider the CWP Guide, p.65-66
June 28, 200520 yr This was always a known problem with "empty" checkboxes (or unchecking them). Try adding a hidden input for the same field with the value of empty: ' <input type="hidden" name="yourFieldName" value="" /> ' <input type="checkbox" name="yourFieldName" value="1" /> NOTE, I didn't account for checked="checked" (as in previously selected).
Create an account or sign in to comment