Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Ajax Validation Input Highlight

$
0
0
Hi.

I have a problem with my "Login-Form". I trying to do something like this:

My ajax-validator checking, if the fields are empty or valid to let the user log-in. When I click into the username field and after leaving the field empty and click out of it, it needs to validate this field as an empty, so its an error (validation part is working) and I want this "username" field now "highlighted", for example with red border.

All I using to check if validator works is just
echo $form->error($model,'username');
and this code tells me, that this field cannot be empty (but this is not enought, I dont want this message, I want my input highlighted)

I am not using the standard structure for this login form, its just printed in a screen, and the inputs are styled somewhere in my css-files.
echo $form->textField($model,'username'); echo $form->passwordField($model,'password');


So I dont have this in
<div class="row"></div>


Can you help me with this ? (sorry for bad english...)
Thx

Viewing all articles
Browse latest Browse all 18717

Latest Images

Trending Articles



Latest Images