Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Single check box problem

Featured Replies

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

That's difficult to comment without any code snippet.

You might consider the CWP Guide, p.65-66

  • 2 weeks later...

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.