Signup and Login Form Examples

Article author
Josh Lopez
  • Updated

When building a website with member accounts, you'll need signup and login forms for users to create accounts and access member-only content. This article provides examples of how to build these forms using Memberstack data attributes.

Signup Form

Here is an example of a basic signup form:

<form data-ms-form="signup"> 
  <label>Email:</label> 
  <input type="email" data-ms-member="email"> 
  <label>Password:</label> 
  <input type="password" data-ms-member="password"> 
  <button type="submit">Sign Up</button> 
</form> 

To sign up the user for a specific plan, add the plan ID:

 <form data-ms-form="signup" data-ms-plan="PLAN_ID"> <!-- form fields --> </form> 

Login Form

Here is an example login form:

<form data-ms-form="login"> 
  <label>Email:</label> 
  <input type="email" data-ms-member="email"> 
  <label>Password:</label> 
  <input type="password" data-ms-member="password"> 
  <button type="submit">Log In</button> 
</form> 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.