Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Khadijah Shtayat , Technical Lead , Opensooq
Date de publication: 2015/02/14
Ashar Awan
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?