I am looking to have users sign up to my website when they have booked something, is it possible to have user profiles where they can log in? Thanks
Hello Sara
First you need to have a members area. you can add your members area:
-
using code : Velo Tutorial: Building Your Own Members Area | Help Center | Wix.com
-
without using code : Site Members: Adding and Setting Up a Members Area | Help Center | Wix.com
After that to make a user sign up after booking, i suggest: -
if you a have a button for booking the item ( Book Button ) you can add an event on the button click to promote login/sign up. Or link it to the members account page.
here’s how the click event would be like:
export function book_click(event, $w) {
wixUsers.promptLogin().then(()=>{
// you can get the user information
let user = wixUsers.currentUser;
let isLoggedIn = user.loggedIn;
let userRole = user.role;
}).catch((err) => {
let errorMsg = err;
});
}
here’s how you can add onClick event or let the button like to the page:
- if booking makes changes to the database i recommend using Hooks (for example you can use before insert hook if you insert an additional information to the database when booking).
check this link to know more about hooks and how to use them: https://www.wix.com/code/reference/wix-data.Hooks.html
Good Luck!
Massa
Okay so what if i wanted all my artist to control and be able to post music and updates to their profile? for fans to see