Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to update yiiactiveform settings ?

I try to build Dynamic Yii Cform the problem is there is no Client validation even thought I set the relayed variable to true

 

How can I modify the yiiactiveform JS settings 

var settings = $(form).data('settings');

settings.attributes.push({

enableAjaxValidation: true,

errorCssClass: "error_msg",

errorID: 'DynamicFields_fee_em_',

id: 'DynamicFields_fee',

model: 'DynamicFields',

name: 'fee'

});

 

$(form).yiiactiveform(settings);

 

The JS error was "too much recursion"

user-image
Question added by Khadijah Shtayat , Technical Lead , Opensooq
Date Posted: 2015/02/14
Ashar Awan
by Ashar Awan , Software Developer , Zepto System

Possible answer of this question would be:-var settings = $('#my-active-form').data('settings'); settings.attributes.push({ enableAjaxValidation:true, errorCssClass:"has-error", errorID:'InputId_em_', id:'InputId', inputContainer:"div.form-group", model:'ModelName', name:'modelName[attribute]', status:1, successCssClass:'has-success', validateOnChange:true//... some other params here...}); jQuery('#my-active-form').yiiactiveform(settings);

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.