How to disable the email update button

Article author
Josh Lopez
  • Updated

Using Memberstack 2.0? There is an updated version of this article here.

Need to prevent members from changing their email address in the profile modal? Here's some code to get you going.

disabled-email-update.png

Add this CSS to any page that might display the profile modal.

<style>
.ms-portal-content label[for="email"]{
z-index: -1;
cursor: not-allowed;
position: relative;
}
.ms-portal-content label[for="email"]::after{
content:" (Please contact us)";
}
.ms-portal-content [data-cy="emailField"]{
z-index: -2;
opacity: 60%;
cursor: not-allowed;
position: relative;
}
.ms-portal-content [ms-lang="email_update"]{
display: none;
visibility: hidden;
}
</style>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.