No doubt yii is a strongest framework with a lot of feature . With in all feature yii have a feature that we can use its submit button as ajax submit button . We can submit the form without refreshing the page . I have tried to make this hope you will like this . you just need to insert a button inside your form like ,

$form=$this->beginWidget('CActiveForm', array(
        'id'=>'myform',        // remember to change this 
        'focus'=>array($model,'loc_name'),
        'enableClientValidation'=>true,

)); 

<div class="row">
    <?php echo $form->labelEx($model,'name'); ?>
    <?php echo $form->textArea($model,'name',array('rows'=>3, 'cols'=>50,'size'=>60,'maxlength'=>200)); ?>
    <?php echo $form->error($model,'name'); ?>
</div>
echo CHtml::htmlButton('Post', array(
    'onclick' => 'javascript: send("#myform",this);', // on submit call JS send() function
    'id' => 'post-submit-btn', // button id
    'class' => 'post-btn pull-right'
));
$this->endWidget();

The button will call jquery function send() on submit .So create a function in your jquery file like this.

function send(form, selector) {
    var formData = new FormData(form[0]);
    $.ajax({
        url: 'some url,
        type: 'POST',
        data: formData,
        datatype: 'json',
        beforeSend: function() {
            // do some loading options
        },
        success: function(data) {
            // your success functionality
            var data = jQuery.parseJSON(data);
            if (data.status == 'success') {
                alert('success');
                form[0].reset();
            } else {
                $.each(data, function(key, val) {
                    $(form).find(" #" + key + "_em_").text(val);
                    $(form).find(" #" + key + "_em_").show();
                });

            }
        },

        complete: function() {

        },

        error: function(xhr, status, error) {
            alert(xhr.responseText)
        },
        cache: false,
        contentType: false,
        processData: false

    });

Create a model for some validation or database functions

 
class ContactForm extends Model
{
    public $name;
    public function rules()
    {
    return [
        // the name attribute is required
        [['name'], 'required'],
    ];
   }
    public function attributeLabels()
    {
        return [
            'name' => 'Your name',
        ];
    }
}

then finally catch the data submitted by the jquery function . Save the data if validate otherwise return a json object with validation errors .

if($model->validate())
{
	if($model->save())
	{
		echo CJSON::encode(array('status'=>'success','message'=>'saved successfully'));
	}else
	{
		echo CJSON::encode(array('status'=>'error','message'=>'some error to save'));
		Yii::app()->end();
	}
}else
{
	$error = CActiveForm::validate($model);
	if($error!='[]')
	echo $error;
	Yii::app()->end();
}	
http://codingbin.com/wp-content/uploads/2015/11/yii.pnghttp://codingbin.com/wp-content/uploads/2015/11/yii-150x150.pngdevidframeworksYiiyii,yii ajax submitNo doubt yii is a strongest framework with a lot of feature . With in all feature yii have a feature that we can use its submit button as ajax submit button . We can submit the form without refreshing the page . I have tried to make this...coding, php, wordpress, yii, cakephp, and  jquery

Are you want to get implementation help, or modify or extend the functionality of this script? Submit paid service request