Registration Form Tag
Overview
Output a member registration form.
Parameters
error_handling=
error_handling="inline"
Choose to display error messages inline (see Error Messages). By default, errors are displayed with the user message template.
return=
return="member/registration/success"
Form Inputs
Member email address. This is a required field:
<label for="email">Email</label>
<input type="email" name="email" value="" maxlength="120" size="40" />
Terms of Service
Terms of Service acceptance. This is a required field:
<input type="checkbox" name="accept_terms" value="y" >
Password
Member password. This is a required field.
<label>Your New Password</label><br />
<input type="password" name="password" value="" maxlength="50" size="40" />
Password Confirmation
Password confirmation. This is a required field and must match the entered password.
<label>Confirm New Password</label><br />
<input type="password" name="password_confirm" value="" maxlength="50" size="40" />
Screen name
Member username. This is a required field and must be unique across the site:
<label for="screen_name">Screen Name</label>
<input type="text" name="screen_name" value="" maxlength="120" size="40" />
Username
Member username. This is a required field and must be unique across the site:
<label for="username">Username</label>
<input type="text" name="username" value="" maxlength="120" size="40" />
Variables
{accept_terms}
{if accept_terms == 'y'}checked="checked"{/if}
{email}
{if email}{email}{/if}
{password}
{if password}{password}{/if}
{password_confirm}
{if password_confirm}{password_confirm}{/if}
{screen_name}
{if screen_name}{screen_name}{/if}
{username}
{if username}{username}{/if}
Variable Pairs
{errors}
Form submission errors are displayed using a “looping pair” as there can be more than 1 error in a form submission.
{errors}
<p>{error}</p>
{/errors}
Error Tag Pair Parameters
backspace=
backspace="3"
The backspace=
parameter will remove characters, including spaces and line breaks, from the last iteration of the tag pair.
Error Tag Pair Variables
{error}
{error}
The error text.
Example
{exp:member:registration_form
return="member/registration/success"
}
{if errors}
<fieldset class="error">
<legend>Errors</legend>
{errors}
{error}<br />
{/errors}
</fieldset>
{/if}
<p>* Required fields</p>
<fieldset>
<h4>Login details</h4>
<p>
<label for="username">Username*:</label><br />
<input type="text" name="username" id="username" value="{if username}{username}{/if}"/><br />
</p>
<p>
<label for="email">Email*:</label><br />
<input type="text" name="email" id="email" value="{if email}{email}{/if}"/><br />
</p>
<p>
<label for="something">Something*:</label><br />
<input type="text" name="something" id="something" value="{if something}{something}{/if}"/><br />
</p>
<p>
<label for="password">Password*:</label><br />
<input type="password" name="password" id="password" value="{if password}{password}{/if}"/>
</p>
<p>
<label for="password_confirm">Confirm password*:</label><br />
<input type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}"/>
</p>
<p>
<label for="terms_of_service">Terms of service:</label><br />
<div>All messages posted at this site express the views of the author, and do not necessarily reflect the views of the owners and administrators
of this site.By registering at this site you agree not to post any messages that are obscene, vulgar, slanderous, hateful, threatening, or that violate any laws. We will
permanently ban all users who do so.We reserve the right to remove, edit, or move any messages for any reason.</div>
</p>
<p>
<label><input type="checkbox" name="accept_terms" value="y" {if accept_terms == 'y'}checked="checked"{/if} /> I accept these terms</label>
</p>
{if captcha}
<p>
<label for="captcha">{lang:captcha}*</label>
{captcha}<br/>
<input type="text" id="captcha" name="captcha" value="" size="20" maxlength="20" style="width:140px;"/>
</p>
{/if}
</fieldset>
<input type="submit" value="Register" class="btn btn-primary" />
{/exp:member:registration_form}