Need to hide an element to members who have a badge

I am building a members dashboard and currently have a crucial “on-boarding steps” section to the page. Once the user has finished the process I want to be able to hide this section from them, as it will no longer be relevant. I feel the best way to do this is by assigning the user a badge and then hiding the box (or any other element) for the logged in user that also has a badge.

I have tried countless times to code this and since I am an amateur I don’t know how to set this up. Can anyone suggest the coding to hide elements of a page for a member who has a badge? Thank you!

1 Like

Hi, casey. There are multiple ways to do that. The simple way is to create the database of people having the badge. As soon as they filled the form you have to place the record to that database. On the page code you have to read this database and if you found the record just call the hide functions to the elements which should not be shown. Or better to group them and call hide for this group.
However to implement this you need to add membership functionality to the site. In that way you will be able to take user id via wix-user api and store it to tha database of users having the badge.
Hope this will help. Cheers

Thanks for your suggestions. I already have a membership functionality set up. Wix automatically creates a database for Badges and has a column for “Members” with Member ID#s of who has been given the badge (with field type as Tags – see attached). This database is also automatically a read-only database and set so that only “admins” can read this database. Can this be used in the page code?

@casey did you figure this out? Im trying to find the code for this process of hiding an element from a logged-in user

1 Like

Hello, I want to do the same with the badges. Is it possible to do this in 2021? The badges that we see in the database are in private … I find it a shame not to be able to use the badges of our members on the frontend part of our site … In the end, what is the use of the badges ?
The wix team, what solutions can you offer us today?

Hi there …

There are several ways you can achieve your goal, personally, I check the values upon visiting the page, and redirect the visitors away if they don’t have access to it.

Assuming there’s a page where it’s only meant for members who have premium plans, first check if they’re premium members or not, then perform the appropriate action.

import { checkMembership } from 'backend/members.jsw';
import { to } from 'wix-location';

$w.onReady(() => {
    checkMembership().then((have_access) => {
        if (have_access) {
        } else {

function initialize() {


Since this thread is old, I’m going to close it, if you still have questions or concerns, feel free to open up a new thread.