Issue #246 new

Implement any way to not display validation errors

Tomasz Trejderowski
created an issue

In current implementation, form elements in TbActiveForm are rendering internally all three key elements -- label, field and validation-error area.

This is cool in general, but you should consider implementing any feature (like for example $htmlOptions['noValidationErrors']) that would allow user to suppress these build-in, rendered internally error-fields. This is especially useful, when user is using his own error-fields, by adding them manually using $form->error(). In this situation, without ability to suppress internal fields, user ends up with two error- fields for each edit-field.

Why one would want to render his or her own error-fields? Look, for example into this article for an answer and more details.

Comments (2)

  1. Tomasz Trejderowski reporter

    This is partially invalid and partially bind with issue #245.

    To suppress validation errors, one can use:

    <?php 
        $htmlOptions = array
        (
            'errorOptions'=>array
            (
                'hideErrorMessage'=>TRUE
            )
        );
    ?>
    

    But, as in mentioned issue, this is fine only for client-side validation stage. After submit 'hideErrorMessage'=>TRUE is ignored and one must use additionally 'style'=>'display: none',

  2. Log in to comment