Replace dynamically content in a custom database table when a custom post is created

This is something that creates one common question for all SW engineers. How you can do this “guide the user to select” and also “provide the capability” so the user can add their own data. Well, there is not an easy way to do it. You can try different technics like live searching, recommendation for the input and all short of miracles but the end result will always be dictated by the user.

If you restricted to the user role if not high enough will be only allowed to add preexisting “towns” this can solve few miswrites but will have a significant drawback which is the review process or the request to add this user-defined inputs.

I would suggest allowing the users input after the couldn’t find the “town from the list”.
The “darker” path will be creating mapper for all towns and cross-checking to the user input.