Account Login Code Sample
Here is some example code to build a login page for the accounts app. This is just an example; you have the flexibility to lay out the page to suit your own design.
Below is a screenshot of the layout that this code will build.
HTML:
Below is the HTML / Branch code that would go in the Template field for the Blog Home content template.
<h1>Login</h1>
<div class="content">
{if #loginForm.failed = 1}
<div class="error">
You've entered an invalid username/password. Please try again.
</div>
{/if}
<form method="{#loginForm.method}" action="{#loginForm.action}">
Username <br />
<input type="text" name="{#loginForm.fields.username.name}" value="{#loginForm.fields.username.value}" />
<br /><br />
Password <br />
<input type="password" name="{#loginForm.fields.password.name}" value="{#loginForm.fields.password.value}" />
<br /><br />
{#loginForm.honeyPot}
<input type="submit" name="submit" value="" />
</form>
<br />
<a href="{#urls.register}">Need to register?</a>