Support › General › switch field type - not saving 0 in the databaseResolved
The switch field not saving 0 in the database. only stores 1 in the database along with field name. I have noticed this behaviour in the group subfield.
Is this the intended format?
Yes, it is the default behavior of Meta Box Group to prevent saving empty values to the database (just raw/minimalist values). You can see on the documentation https://docs.metabox.io/extensions/meta-box-group/#sub-field-values
Thank you for your information.
If possible, please edit the document Switch#data
Because it says: "Switch field stores the "on" and "off" status in the database as "1" or "0"."
When you use the switch field as a top field, the value 0 is saved to the database as well. It will not be saved when the field is a subfield in a group.