kuma_24 Posted June 17, 2005 Posted June 17, 2005 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
Martin Brändle Posted June 18, 2005 Posted June 18, 2005 That's difficult to comment without any code snippet. You might consider the CWP Guide, p.65-66
beverly Posted June 28, 2005 Posted June 28, 2005 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).
Recommended Posts
This topic is 7088 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now