Displays a summary of validation errors for one or several models.
This method is very similar to {@link CHtml::errorSummary} except that it also works
when AJAX validation is performed.
public errorSummary ( mixed $models, string $header = null, string $footer = null, array $htmlOptions = [] ) : string | ||
$models | mixed | the models whose input errors are to be displayed. This can be either a single model or an array of models. |
$header | string | a piece of HTML code that appears in front of the errors |
$footer | string | a piece of HTML code that appears at the end of the errors |
$htmlOptions | array | additional HTML attributes to be rendered in the container div tag. |
return | string | the error summary. Empty if no errors are found. |
/* @var $this PersonspecialityController */ /* @var $model Personspeciality */ /* @var $form CActiveForm */ ?> <div class="form"> <?php $personid = $model->PersonID; $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'spec-form-modal', 'enableAjaxValidation' => false)); $form = new TbActiveForm(); ?> <?php echo $form->errorSummary($model); ?> <?php echo CHtml::hiddenField('personid', $personid); ?> <?php //echo !$model->isNewRecord ? $form->hiddenField($model,'idSpeciality') : ""; //debug($model->attributeLabels("isBudget")); ?> <div class="row-fluid"> <div class="span5"> <div class="row-fluid"> <div class="span4"> <?php echo $form->labelEx($model, 'isBudget'); ?>