If I have a product model and the user chooses its category from a dropdown menu where only the name is displayed, is there a way to implement an "add" button next to the dropdown? The button would trigger a javascript prompt dialog for users to add a new category by typing its name. This new category should then be saved in the database and the dropdown updated accordingly.
Any suggestions on the most effective method to accomplish this?
Appreciate any guidance!