Managing Member Plans with Data Attributes

Article author
Josh Lopez
  • Updated

Memberstack includes data attributes that allow you to add and remove member plans directly in your Webflow site.

Adding Plans

To add a free plan, use the data-ms-plan:add attribute with the plan ID:

<a data-ms-plan:add="PLAN_ID" href="#">Sign Up Now</a>

To add a paid plan, use the data-ms-price:add attribute with the price ID:

<form data-ms-price:add="PRICE_ID"> <!-- form fields --> </form>

Removing Plans

To remove a free plan, use the data-ms-plan:remove attribute:

<a data-ms-plan:remove="PLAN_ID" href="#">Cancel Plan</a>

Quick Tip: data-ms-plan:remove can be used with data-ms-content="CUSTOM_FIELD_ID" to only show a cancel button if the member is part of a Gated Content Group.

If your members need to cancel a paid plan they need to go to the stripe customer portal data-ms-action="customer-portal" which would be added to a button.

The data-ms-price:remove="all" attribute is used to clear out any previously selected plans if a member clicks several.

Examples

Add a signup form for a free plan:

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

Allow members to cancel a free plan:

<a data-ms-plan:remove="PLAN_ID" href="#">Cancel Plan</a>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.