Hi everyone,
I have this kinda simple problem but I can’t find a solution.
I display my error summary like this:
<?php echo $form->errorSummary($model, NULL, NULL, array("class" => "standard-error-summary")); ?>
So far nothing special, but you can see I need $form to be init like this:
<?php $form = $this->beginWidget("CActiveForm", array("id" => "blabla")); ?>
The problem is when you write this last line of code it will begin a HTML <form>.
So basically I can get the error summary to be displayed after the form (i.e. after endWidget()).
But I want the error summary before the form, so before beginWidget(). Which, of course, does not work as $form does not exists yet.
If someone has any idea how I can find a workaround?
Thanks.
PS: My question can also be, is there a way to init my CActiveForm without running it?