Generating forms using Gii

When I fill the fields in the form generation mode I get the following The form has been generated successfully.

You may add the following code in an appropriate controller class to invoke the view:

Kindly assist me with controller class am i supposed to add this code to?


public function actionLogon()


&#036;model=new LoginForm('register');

// uncomment the following code to enable ajax-based validation


if(isset(&#036;_POST['ajax']) &amp;&amp; &#036;_POST['ajax']==='login-form-logon-form')


    echo CActiveForm::validate(&#036;model);









        // form inputs are valid, do something here






Depends on what your business logic requires but you should figure it out after reading the controllers chapter of the guide.