Support » Plugin: Events Manager » Custom Fields with “0” as a Value

  • 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 4 replies - 1 through 4 (of 4 total)
  • Plugin Support caimin_nwl

    (@caimin_nwl)

    Hi,

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

    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

    Plugin Support caimin_nwl

    (@caimin_nwl)

    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

    (@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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.