Problem With Create Controller

Hi All

I am stucked in a strange problem . I have a controller with a create action. The controller is written below

public function actionCreate(){

    $model=new Division();











Now the problem is that the values that I am submitting in the form are getting submitted two times ie there are two same entries in the database every time.

I have done these types of things many a times and never faced any problem but this thing is making me mad now…

Kindly Help


how are you doing the submit of the form ?

the controller code looks fine and should work normally

You deleted the ajax validate.

If in your form you use ajax validation, you have to keep this line in the controller:


If you don’t want ajax validation, remove it from the form.