Saving Widget Configuration in a custom table

We are using TC 9.2, Please let me know if it possible or any suggestion on workarounds

Have to save the widget configuration data to a custom table, that is when widget is opened in edit page mode. On clicking save on widget configuration the data should save in custom table. Any string, blog, group extra taken input in widget configuration.