Login Form
Generate necessary markup to create a User login form.
Example
A basic login form, with validation errors.
{{ user:login_form }}
{{ if errors }}
<div class="alert alert-danger">
{{ errors }}
{{ value }}<br>
{{ /errors }}
</div>
{{ /if }}
<label>Username</label>
<input type="text" name="username" value="{{ old:username }}" />
<label>Password</label>
<input type="password" name="password" value="{{ old:password }}" />
<button>Log in</button>
{{ /user:login_form }}
Parameters
attr
string |
Set HTML attributes, e.g., |
---|---|
redirect
string |
Where the user should be taken after successfully logging in. |
allow_request_redirect
boolean |
When set to true, the |
Variables
errors
array |
An array of validation errors. |
---|