How to handle CRUD on view page in Yii2?

I have a CRUD of Groupdetails where I create new groups and members belonging to that group.

I have tables groupdetails and memberdetails.

Now when every group is created, monthly saving calculation has to be done. I will create another table called groupcalculation which will store each months total saving, loan recovery, loan interest, fine etc, and performs some mathematical calculation before storing the data into table.

Now I don’t want to create a seperate form for this. Now in groupdetails CRUD, on view page I want to handle all this.

How to accept the data from user on view page of groupdetails.

  1. By submitting a form i.e. having a form for each entry right there.
  2. With the help of some JavaScript that submits data via AJAX.

How to do this? Can you explain in detail?

I don’t have tutorial ready for it but it’s no different than doing it without Yii.