Welcome Guest, Not a member yet? Register   Sign In
Display form validation errors in an unordered list in a proper way.
#4

[eluser]Victor Michnowicz[/eluser]
Another thing I "discovered" recently was this:

Code:
$config = array(
    array(
        'field'   => 'name',
        'label'   => '<a href="#name">Name</a>',
        'rules'   => 'required'
    ),
    array(
        'field'   => 'email',
        'label'   => '<a href="#email">Email</a>',
        'rules'   => 'required'
    )
);

So now the error will include a link to the element that has an error (Assuming you name your inputs appropriately). You can even include some JavaScript (or :target) to help highlight the field.


Messages In This Thread
Display form validation errors in an unordered list in a proper way. - by El Forum - 01-05-2011, 03:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB