<h2>Account - Profile</h2>
{if logged_in AND segment_3 == "success"}
<h3>Profile updated</h3>
{if:elseif logged_in}
<h3>Edit profile</h3>
{exp:visitor:update_form return="visitor_example/profile/success"}
<fieldset>
<p>
<label for="member_firstname">{label:member_firstname}</label>
<input type="text" name="member_firstname" id="member_firstname" value="{if member_firstname}{member_firstname}{/if}"/>
</p>
<p>
<label for="member_lastname">{label:member_lastname}</label>
<input type="text" name="member_lastname" id="member_lastname" value="{if member_lastname}{member_lastname}{/if}"/>
</p>
<p>
<label for="member_birthday">{label:member_birthday}</label>
<input type="text" name="member_birthday" id="member_birthday" value="{member_birthday}" maxlength="23" size="25"/>
</p>
<p>
<label for="member_gender">{label:member_gender}</label>
{options:member_gender}
<input type="radio" id="member_gender" name="member_gender" value="{option_value}"{checked} />{option_value}{/options:member_gender}
</p>
</fieldset>
<br/>
<fieldset>
<legend>Native member field</legend>
<p>Native member fields like location, url, signature, etc... can be handled by creating a channel field with the same name prefixed with "_member"
For example member_signature will sync to the signature field. Custom member fields can be handled in the same way. Just create a channel field prefixed with "member_" and the value
will also be saved to the profile.</p>
<p>
<label for="member_signature">Native member signature</label>
<input type="text" name="member_signature" id="member_signature" value="{if member_signature}{member_signature}{/if}"/>
</p>
</fieldset>
<p>
<input type="hidden" name="title" value="{username}">
<input type="submit" value="Submit" class="button"/>
</p>
{/exp:visitor:update_form}{if:else}
You are not logged in. <a href="{path=visitor_example/login}">Login</a> now.
{/if}
The update form tag can be used to update native member fields like password, username, screen_name, email & all custom fields you have defined in the member channel.
Error delimiters of errors when selecting inline error_handling. Each error will be wrapped in this piped parameter
error_delimiters=’<span class=”error”>|</span>’
(Optional) Default off, set to “yes” to require the current password.
This parameters allows you to require the input of the current password when updating other profile fields like firstname, lastname, birthday etc...
When updating username, screen_name, email or password inside the update form providing the current password is always required except for super-admins and the parameter does not have to be specified.
<input name="current_password" type="text" />
When using error_handling=”inline”, {error:current_password} can be used to display the current password error.
(Optional) The username of the member you want to edit in the update form
When member_id, member_entry_id or username is not provided as a parameter, the current logged in member details will be used in the update form.
When updating the membergroup, you have to provide the group ids of the allowed member groups as a pipe. allowed_groups=”5|6” Use a field with name “group_id” to select the member group in the update form.
Native custom member fields can be used when integrating with MailChimp/Campaign Monitor subscriptions which are handled by other extensions and depend on native fields.
Native fields like signature, url, locations etc... and custom created member fields can be managed by creating a channel field with the same name prefixed with “member_”. Changes in these channel fields will be reflected in the native fields.
<h2>Account - Change password</h2>
{if logged_in AND segment_3 == "success"}
<h3>Password updated</h3>
{if:elseif logged_in}{exp:visitor:update_form return="visitor_example/change_password/success"}
<fieldset>
When changing your password, you will be asked to login again for security reasons.
<p>
<label for="current_password" class="form-label">Current password:</label>
<input type="text" name="current_password" id="current_password" class="form-text" />
</p>
<p>
<label for="new_password" class="form-label">New password</label>
<input type="password" name="new_password" id="new_password" class="form-text" />
</p>
<p>
<label for="new_password_confirm" class="form-label">Confirm New password</label>
<input type="password" name="new_password_confirm" id="new_password_confirm" class="form-text" />
</p>
</fieldset>
<p>
<input type="submit" value="Submit" class="button" />
</p>
{/exp:visitor:update_form}{if:else}
You are not logged in. <a href="{path=visitor_example/login}">Login</a> now.
{/if}
Support
Having problems setting up and/or using Visitor? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.