Update 2: not working in both “Select multiple values?” custom field setting is set to yes or no.
If you once choose a value on this field, in post edition, you can choose another value, but you never more can delete ALL options selected in this field.
Updating: I’m not able to delete posts selected on this custom field.
The field is set to:
Allow null: tested with yes or no, not working.
If I change a value (choose another post) on the field, it saves.
If I remove all posts in the field (I don’t want any post here), it don’t delete the post on the field on updating the current post.
I think this is a good idea, have a confirmation as part of ACF.
In some cases another users (which aren’t developers) uses the fields to insert/alter/remove data in posts, pages, etc.
Usually, these users don’t have so much “developer” skills, and deletes a field as a mistake. It already happened with a client, and is a little frustrating for the user (depending on the field deleted, a lot of work could be lost).
An idea is to do as the guys at MailChimp does: when deleting a block, a dialog appears. This dialog have an information about “how to delete a block without dialog”, which is “hit ALT to delete without asking”.
So, if a read this info, next time I know how to delete without ask.
By the way, I really LOVE ACF. Thanks, E!
PS.: I’ve tried to make the JS above work, but till now it didn’t work.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.