Switch fields always saves as true (1)

Support MB Custom Table Switch fields always saves as true (1)Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19336
    NestelarNestelar
    Participant

    Hi, using a custom table that worked perfectly for quite a while the switch fields now always save as true (value 1 in the custom table). Text fields (from the same metabox as the switches) are updated just normal, so it isn't the link to the custom table that is the culprit imho.
    Please anybody an idea?
    Thanks!

    #19345
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Could you please let me know the data type of column which saves switch value? I'm just using type INT and it saves the value 0 and 1 as well, see my screenshot https://cl.ly/54c9e116ec61

    Here is the sample code https://pastebin.com/nvMFeqKD

    #19362
    NestelarNestelar
    Participant

    Hi,
    thank you so much. This was the spot I needed to look at.
    I've changed the datatype to integer and everything is back up and running.
    What I don't get is that I've used the bit-datatype for a few years and never had this problem. But anyway, it's fixed 🙂
    thanks!

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