I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta item, BUT force it to be unique. Ideally the process would work like so:
- Contributor logs into WP Admin and chooses New Post
- In custom fields area, they choose the key (something like “group-title”) and then enter their value
- some ajaxy thing verifies whether this value exists in the db, and warns them to pick another value if it does
- Post will not save or update unless value is unique
In my search of previous items, I found this post but it doesn’t seem to help with the ajaxy checking nor prevent submit in admin.
Solutions Collecting From Web of "Check for and enforce unique value in user-entered custom meta field in WP Admin"