You can display member data on your site using Memberstack data attributes. This allows you to show information like a member's email, name, signup date, and any custom fields you have created.
Use data-ms-member="email"
to display or submit the member's email address. For example:
<div data-ms-member="email"></div> <input type="email" data-ms-member="email">
Password
Use data-ms-member="password"
as an input to allow members to submit their password. For example:
<input type="password" data-ms-member="password">
Signup Date
Display the member's signup date with data-ms-member="signupDate"
. For example:
<div data-ms-member="signupDate"></div>
Custom Fields
Show custom field values using data-ms-member="CUSTOM_FIELD_ID"
, replacing CUSTOM_FIELD_ID with your actual custom field ID. For example:
<div data-ms-member="customField1"></div>
This allows you to display fields like names, addresses, company, etc.
Other Attributes
Additional attributes are available for specific use cases:
-
data-ms-member="token"
- Used to submit reset password tokens -
data-ms-member="currentPassword"
- Allow changing passwords by submitting current password -
data-ms-member="newPassword"
- Allow setting a new password
For example, to allow resetting a password with a token:
<form>
<input type="text" data-ms-member="token">
<input type="password" data-ms-member="newPassword">
</form>
And to allow changing passwords:
<form>
<input type="password" data-ms-member="currentPassword">
<input type="password" data-ms-member="newPassword">
</form>
Comments
0 comments
Please sign in to leave a comment.