Support

Account

Home Forums Feature Requests Read-Only Field Reply To: Read-Only Field

  • I believe I have found a bug when setting a post_object field to be disabled (setting it to readonly doesn’t work). The end result is that updating a post that uses a disabled post_object field clears out any values stored in that field. Here’s step by step instructions to reproduce:

    1. Create a Post Object field, say in an Options page. Allowing multiple values to be set seems to not matter.
    2. Go to the Options page and add one or more posts to this field, save, and see that repeated saving of Options works fine; the posts set in the field are still there.
    3. Add the acf/load_field filter to your functions.php in order to set the field so that disabled = 1 (I tried readonly instead but that had no effect).
    4. Refresh the page, and see that the post you previously set is still there.
    5. Save the page/options, and on page load, the Post Object field is now blank