How to create record in a model from a table widget

I have created a table widget of plan and added a button to buy a plan now i want to create an entry whenever a user purchases a plan
1 Reply