I am working on a custom widget that allows user to enter a field (Name). When the user clicks "Add Name", the widget should add another new field without refreshing the page and without saving the input.
In short, the form should be dynamic by allowing user to add new Name field with a click of a button. All the fields only save when the user clicks on the wordpress default "Save" button.
I found a widget that has the dynamic form, but it saves and updates the form automatically on every "Add Row" button pressed, which I don't want. Here is the link to that plugin: https://wordpress.org/plugins/repeater-entries-widget/screenshots/
Note: I know we can achieve this by using custom post type, but I think custom post type is not a good feed for my purpose.