Custom Fields with “0” as a Value
-
Hi there,
Hopefully a pretty straightforward question here, but I’m trying to create a custom select field that has 0 or 1 as the possible values, and while I’ve been successful in doing that, I notice that if an event is saved with “0” as the value of a particular field, that field is removed from the database rather than being updated with the 0 value.
From the front-end, things work just fine, but I do need to be able to query posts in the database that have a “0” value in that field. Due to other restrictions, it does have to be “0” rather than “false” or “null”. Is there any way to prevent that entire meta record from being deleted when the “0” value is selected?
Thank you much!
- The topic ‘Custom Fields with “0” as a Value’ is closed to new replies.