errorSummary is out of monitor screen


I have huge form and user must scroll several times to fill every field. Also the form has:

<?php echo $form->errorSummary($model); ?>

line and it’s working well!

However, when user is on bottom of the form (of the page) and (s)he missed some field, actually activate validation rules the errorSummary shows the errors on top of the form and user cannot see it, even the fields in red color if they are on top.

How to jump to the top of the form (page) after user click on Create/Save button?


I tried to implement two errorSummary elements but the form shows one only.

Any solution?

You can add

<?php echo CHtml::error($model, 'attribute')?>

After each field, this repeat the error message for each field.

Thanks zaccaria for your reply.

I already have this line for each field in form and they are working well.

The problem is: huge form where user must scroll down to populate all fields. So, when is on bottom of the page, the errorSummary is out of sight. Sometime field which initiate the validation rule is out of sight too and user cannot see warning red color message. Then user don’t know what happens and why form is not accepted. As a rule, users always forgot to scroll up to see errorSummary.

Any solution?

Put a css style on the flash div, like:

position: absolute;

top: 0px;

Then it should display on top of the ‘monitor’ at all times, regardless of where the user is at the page.:)