$errors = $model->errors; foreach ($errors as $k => $error) { if ($k == 'nospam') { continue; } foreach ($error as $item) { ?> <p class="text-danger"><?php echo Html::encode($item); ?> </p> <?php } } } $math_init = $model->mathInit(); ?> <form role="form" action="" method="post"> <input type="hidden" name="FeedbackForm[nospam]" value=""> <div class="form-group<?php echo isset($errors['fio']) ? ' has-error' : ''; ?> "> <label class="control-label" for="controlFio"><?php echo $model->getAttributeLabel('fio'); ?> <small></small></label> <input type="text" class="form-control" name="FeedbackForm[fio]" id="controlFio" value=""> </div> <div class="form-group<?php echo isset($errors['phone']) ? ' has-error' : '';