Hi i want to know how can i hide items from post object field once i select and save the post.
eg: i’m going to create a new post and then i select post from post object relationship field, once i save the post and go to create new post. last selected item from post object field needs to be hidden or removed. and field need to contain only unselected or non related post object item that doesn’t belong to any post.
Usecase : i’m creating a front end form and there is a select field(post_object) once user select prospect from that field and publish it. next time he create a new post that select field need to hide last post selected item. i hope this make sense.
There isn’t any easy way to do this and there isn’t any simple code I can post. There would be a lot of coding and testing involved to do something like this. All I can do is explain how it can be done.
I would create an acf/save_post action that runs before acf (priority < 10). I would look at the value of the relationship field, both the old value and the new value and update my option value as needed.