Home Forums Backend Issues (wp-admin) How to update true/false field Reply To: How to update true/false field

  • Hi @toleanu

    The true/false field will save it’s data as either a 1 or a 0. So the code update_field('topic_solved', 1, 4237) should work correctly.

    If the post (4237) does not already contain a value, you must use the field_key instead of the field name, however, it looks like you have already tried this.

    Perhaps the code is not running due to a PHP error before it?