Jquery Trigger Form Submit On Page Load With Confirmation Dialog

I have a form which users can fillup partially and save to db upon clicking submit button.

There is no required validation in my form.

every time users come to this form and submit I check whether they have fillup all required field in db during insert and update.

After hiting save button after calling $model->save()

If all field is filled up in db I want to show a jquery confirm dialog.

If user click yes it will update a field in that model nothing otherwise.

I am new to yii.

Can anyone help please?