• Pratham

    (@pratham2003)


    Let’s say I want to store an optional numerical value, but in the current implementation if I leave a numerical field blank it is saved as a blank value in post_meta by ACF (correct) but as a 0 (zero) in the custom table, which is a falsy value but doesn’t clearly indicate whether the field was left blank or someone manually entered 0. (e.g. 0 can be a valid value in some cases).

    Also, when I save this new post for the first time the values are being read back from the custom table, which outputs “0” in the numerical field. Saving the post again changes the blanks in postmeta table to “0” for the saved post.

    Furthermore, if the field validation is not-required then the SQL field can be marked as nullable?

    • This topic was modified 1 year, 9 months ago by Pratham.
  • The topic ‘Support for NULL values’ is closed to new replies.