I'm developing a widget. Its form has two HTML select
elements: one to display a list of all categories, and the other for displaying a list of posts based on the selected category.
The posts HTML select
element depends on the selected category to show a list of posts. That works fine. The problem is I must save the widget after selecting a category in order to populate the posts select
element with the posts of the selected category.
How can I populate the posts select
element as soon as I choose a category from the category select
element, without the need of clicking the save button?