Skip to content

Commit c48a911

Browse files
committed
added docs for inline member registration errors
1 parent 8d7e23a commit c48a911

File tree

1 file changed

+77
-54
lines changed

1 file changed

+77
-54
lines changed

docs/member/registration.md

Lines changed: 77 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ This parameter allows you to specify the primary role to assign the new member,
3939

4040
The primary role that will be assigned to registered member. If omited, the default role will be assigned.
4141

42+
### `error_handling="inline"`
43+
error_handling="inline"
44+
This parameter allows you to use inline errors in your registration form
45+
46+
4247
## Form Inputs
4348
NOTE: Be sure to include the required Javascript and CSS to use the native [Password Validation](member/password-validation.md).
4449

@@ -99,14 +104,27 @@ Please note you need to address those by ID and not name, e.g. `m_field_id_8`
99104

100105
{if accept_terms == 'y'}checked="checked"{/if}
101106

107+
### `{error:accept_terms}`
108+
109+
{if error:accept_terms}{error:accept_terms}{/if}
110+
102111
### `{email}`
103112

104113
{if email}{email}{/if}
105114

115+
### `{error:email}`
116+
117+
{if error:email}{error:email}{/if}
118+
106119
### `{password}`
107120

108121
{if password}{password}{/if}
109122

123+
### `{error:password}`
124+
125+
{if error:password}{error:password}{/if}
126+
This will show errors with the submitted password as well as password confirm.
127+
110128
### `{password_confirm}`
111129

112130
{if password_confirm}{password_confirm}{/if}
@@ -119,61 +137,66 @@ Please note you need to address those by ID and not name, e.g. `m_field_id_8`
119137

120138
{if username}{username}{/if}
121139

140+
### `{error:username}`
141+
142+
{if error:username}{error:username}{/if}
143+
122144

123145
## Example
124146

125147
{exp:member:registration_form
126-
return="member/registration/success"
127-
}
128-
129-
<p>* Required fields</p>
130-
<fieldset>
131-
<h4>Login details</h4>
132-
133-
<p>
134-
<label for="username">Username*:</label><br />
135-
<input type="text" name="username" id="username" value="{if username}{username}{/if}"/><br />
136-
</p>
137-
138-
<p>
139-
<label for="email">Email*:</label><br />
140-
<input type="text" name="email" id="email" value="{if email}{email}{/if}"/><br />
141-
</p>
142-
143-
<p>
144-
<label for="something">Something*:</label><br />
145-
<input type="text" name="something" id="something" value="{if something}{something}{/if}"/><br />
146-
</p>
147-
148-
<p>
149-
<label for="password">Password*:</label><br />
150-
<input type="password" name="password" id="password" value="{if password}{password}{/if}"/>
151-
</p>
152-
153-
<p>
154-
<label for="password_confirm">Confirm password*:</label><br />
155-
<input type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}"/>
156-
</p>
157-
158-
<p>
159-
<label for="terms_of_service">Terms of service:</label><br />
160-
<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
161-
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
162-
permanently ban all users who do so.We reserve the right to remove, edit, or move any messages for any reason.</div>
163-
</p>
164-
165-
<p>
166-
<label><input type="checkbox" name="accept_terms" value="y" {if accept_terms == 'y'}checked="checked"{/if} /> I accept these terms</label>
167-
</p>
168-
169-
{if captcha}
170-
<p>
171-
<label for="captcha">{lang:captcha}*</label>
172-
{captcha}<br/>
173-
<input type="text" id="captcha" name="captcha" value="" size="20" maxlength="20" style="width:140px;"/>
174-
</p>
175-
{/if}
176-
</fieldset>
177-
178-
<input type="submit" value="Register" class="btn btn-primary" />
179-
{/exp:member:registration_form}
148+
return="member/registration/success"
149+
error_handling="inlinew"
150+
}
151+
152+
<p>* Required fields</p>
153+
<fieldset>
154+
<h4>Login details</h4>
155+
156+
<p>
157+
<label for="username">Username*: {if error:username}{error:username}{/if}</label><br />
158+
<input type="text" name="username" id="username" value="{if username}{username}{/if}"/><br />
159+
</p>
160+
161+
<p>
162+
<label for="email">Email*: {if error:email}{error:email}{/if}</label><br />
163+
<input type="text" name="email" id="email" value="{if email}{email}{/if}"/><br />
164+
</p>
165+
166+
<p>
167+
<label for="something">Something*:</label><br />
168+
<input type="text" name="something" id="something" value="{if something}{something}{/if}"/><br />
169+
</p>
170+
171+
<p>
172+
<label for="password">Password*: {if error:password}{error:password}{/if}</label><br />
173+
<input type="password" name="password" id="password" value="{if password}{password}{/if}"/>
174+
</p>
175+
176+
<p>
177+
<label for="password_confirm">Confirm password*: </label><br />
178+
<input type="password" name="password_confirm" id="password_confirm" value="{if password_confirm}{password_confirm}{/if}"/>
179+
</p>
180+
181+
<p>
182+
<label for="terms_of_service">Terms of service:</label><br />
183+
<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
184+
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
185+
permanently ban all users who do so.We reserve the right to remove, edit, or move any messages for any reason.</div>
186+
</p>
187+
188+
<p>
189+
<label><input type="checkbox" name="accept_terms" value="y" {if accept_terms == 'y'}checked="checked"{/if} /> I accept these terms {if error:accept_terms}{error:accept_terms}{/if}</label>
190+
</p>
191+
192+
{if captcha}
193+
<p>
194+
<label for="captcha">{lang:captcha}*</label>
195+
{captcha}<br/>
196+
<input type="text" id="captcha" name="captcha" value="" size="20" maxlength="20" style="width:140px;"/>
197+
</p>
198+
{/if}
199+
</fieldset>
200+
201+
<input type="submit" value="Register" class="btn btn-primary" />
202+
{/exp:member:registration_form}

0 commit comments

Comments
 (0)