Hi all,
I have one question and i will hope get answer:)
I talk about CActiveForm. I want make dynamic error message on form input tag.
For example if input tag not validated i want that input tag make with red border…
Do you know some best practices on how to do that??
So, what i do:
I show you, haw i describe my form head (this is just snippet of code, in my view are full code, with error $form->error($model,‘name’) tag`s )
[left]$form=$this->beginWidget(‘CActiveForm’, array(
'id'=>'autosr-form',
'action'=>array('autosr/AjaxAutosrStep1'),
'htmlOptions'=>array('enctype'=>'multipart/form-data'),
'enableAjaxValidation'=>true,
'enableClientValidation'=>false,
'clientOptions'=>array(
'validateOnSubmit'=>true,
'inputContainer'=>'td',
'errorCssClass'=>'formErrorBorder',
'hideErrorMessage'=>true,
'validateOnChange'=>false,
),
)); [/left]
I describe css class for that, enable enableAjaxValidation=true, but that style not assigned to input tag with error (i do many debug with firebug), but only fire if ‘validateOnChange’=>true (but this is only at once input, need on all by click submit).
For me this not working (no error display), can somebady help me on that??
Maybe are error on params i use?? Or need some more, who i don`t know…