Welcome Guest, Not a member yet? Register   Sign In
display login error
#5

[eluser]runrun[/eluser]
If we have a form, where we display validation message inline with form fields, certainly general errors like "account not yet activated" should be display on top/bottom of the form, therefore I would set my form look like this

The problem is we will have double error messages. Because function validation_errors and form_error() will do the same thing at the same time.
Code:
<?=validation_errors()?>
<form id="login_form" method="post">
    <div>
        <label for="email">Email</label>
        &lt;input type="text" name="email" id="email" value="&lt;?=set_value('email')?&gt;" /&gt;
        &lt;?=form_error('email')?&gt;
    <div>
    <div>
        <label for="password">Password</label>
        &lt;input type="password" name="password" id="password" /&gt;
        &lt;?=form_error('password')?&gt;
    </div>
        &lt;input type="submit" value="Login" name="login" /&gt;
&lt;/form&gt;


Messages In This Thread
display login error - by El Forum - 03-16-2009, 09:57 AM
display login error - by El Forum - 03-16-2009, 10:08 AM
display login error - by El Forum - 03-16-2009, 10:27 AM
display login error - by El Forum - 03-16-2009, 11:13 AM
display login error - by El Forum - 03-16-2009, 07:03 PM
display login error - by El Forum - 03-17-2009, 09:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB