Checkbox fields in WordPress Metaboxes a solution for NULL values

Talking about forms, one of the most common issues is that checkbox fields don’t return any value when they are not checked. We just receive their values -usually TRUE- when they are checked but if they are unchecked they ‘say’ nothing. What can we do?

Checkbox fields in WordPress Metaboxes a solution for NULL values

This behavior of checkboxes fields is not an error, long time ago they was designed in that way (they are silent) however, in most cases,  this behaviour is a problem because the lacking of value doesn’t allow developers to know whether there is not actually a value, or if the value is actually FALSE. There is not difference between NOTHING and FALSE so Continue reading…