Login¶
{exp:visitor:login_form}
Login tag variables¶
error_handling¶
Default off, set to “inline” to enable inline error handling. When using inline error handling, {error:login} will return the errors.
id¶
css id of the form
class¶
css class of the form
return¶
Template where the member will be redirected when login is successful
json¶
Default no, set to “yes” the form will output your results in JSON format, instead of performing a redirect. Use this setting when constructing an AJAX login form.
secure_action¶
Forces the form to use https as its action.. Yes/No Defaults to “no”.
secure_return¶
Force the form to return to https. Yes/No Defaults to “no”.
Login form example¶
Regular login form¶
{exp:visitor:login_form return="account/profile" error_handling="inline"}
{error:login}
Email: <input id="username" name="username" type="text" />
Password: <input id="password" name="password" type="password" />
{if auto_login}
Remember me? <input class="checkbox" name="auto_login" type="checkbox" value="1" />
{/if}
<input name="submit" type="submit" value="Log in" />
{/exp:visitor:login_form}
AJAX login form¶
Check the included sample template