I have a web page with 4 membership groups: landlords, owners, renters, and management companies. I create a form to update their information in the member’s area. However, the first line of the form is a radio button. It matches the 4 membership groups. What I want to do is lock it down. Example.
If I assign this user to the landlord group, I want the radio button landlord to be selected immediately and cannot be changed by the user. I found out that each member group has a unique id.
Jack
It is an association web page. The user signs up then is approved. Upon approval, the user is assigned to any of these 4 groups. We are having issues with members’ area showing their data when logging in. so that is what we are working on. One of the forms will stay read-only to show the user data on this form. Another page is created with a form and suppose to be write-only. we created a multistep form for the user to fill up his family information. On this form, we added a radio on the top that lets you select which group you are in. However we do not want them to select it as there are rules. Whatever group you belong to required inputs are shown.
We thought if we can comment on these membership groups with the radio buton.
For example, if the user belongs to a landlord member group the landlord radio section is selected and based on that inputs are shown. it will be the same for others. also we need to have a way to update their info and keep a revision of it
The following message is only for @nhbarakat ‘s case.
Have you heard of member badges?
Badges are something you can be awarded to by a site owner assigning them and giving permissions and roles, such as a special forum category, or pricing plans, or legit anything.
You need be logged in to your account ON your live website.
So let’s say I have a website called “Video house” and I need to assign a badge.
Go to any members profile page and press the 3 dots on the corner of the page and click assign badges.
this is the code that i have import wixUsers from ‘wix-users’ ; import wixData from ‘wix-data’ ; import wixUsersBackend from ‘wix-users-backend’ ;
// …
let user = wixUsersBackend . currentUser ;
let userId = user . id ; // “r5cme-6fem-485j-djre-4844c49” let isLoggedIn = user . loggedIn ; // true
$w . onReady ( function () {
// Write your JavaScript here
wixData . query ( “Members/Badges” )
. find ()
. then ( ( results ) => {
// handle the results if ( user . loggedIn === bdrenter )
{
bdrenter = $w ( ‘#rdownership’ ). value = “renter” ;
} else { if ( user . loggedIn === bdowner )
{
bdowner = $w ( ‘#rdownership’ ). value = “owner” ;
} else { if ( user . loggedIn === bdlandlord )
{
bdlandlord = $w ( ‘#rdownership’ ). value = “landlord” ;
} else { if ( user . loggedIn === bdmg )
{
bdmgm = $w ( ‘#rdownership’ ). value = “mgmtcmpy” ;
}
}
}
}
});
however the issue now is how can i confirm this if ( user . loggedIn === bdrenter ). it suppose to work this way id the user loged-in is a member of bdrenter badge. how do i write this code.
can you help please