• Resolved Max

    (@lanex)


    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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    How are you creating the custom select field? In the forms editor?

    Thread Starter Max

    (@lanex)

    Hi there,

    The custom field is generated by the Advanced Custom Fields plugin, but also is referenced the same way in Events Manager. In other words, Events Manager and ACF are manipulating the same field.

    Thank you

    This looks like a bug to me because it’s possible to save a custom field with a value of 0 on the normal post / page screen. I’ve passed this on to the Dev team.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    just to let you know we’re looking into this and will fix in the next update. We’ll update you here when there’s a dev version available.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    sorry, we never updated you about the dev version as it has been sorted for some time, but just to let you know the latest update 5.8.1.1 fixes this.

    Let us know if not!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Fields with “0” as a Value’ is closed to new replies.