Skip to main content

Signup and Login Form Examples

Josh Lopez
Josh Lopez

When building a website with member accounts, you 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.   

1) 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> 

2) 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?

Didn’t find your answer?

Get an instant answer from Rey, or reach a human. Either way, we’re happy to help.

Comments

1 comment

Please sign in to leave a comment.

Sitemap