How can I save multiple checkboxes to member profiles?

Hey there! I really want that when you select a checkbox, it saves the enabled/disabled checkbox to the person’s member profile. Am I able to do that? I’m making a Trophy Hunting Site, so I must have that settled. I hope you guys could help me with this because I can’t seen to find any good and easy step-by-step tutorial on this.

Thanks.

P.S. My site with the checkboxes:
GameSites (wixsite.com)

Yes, you can do it by code, but you will need several steps to go, till you can achieve your aim.

What you should know for your project?

  1. How to use Velo-APIs ? https://www.wix.com/velo/reference/api-overview

  2. How to get data out from DB? Your data will be surelly stored in a DB.
    https://www.wix.com/velo/reference/wix-data/query

  3. How to save data back to DB?
    https://www.wix.com/velo/reference/wix-data/save
    …or…
    https://www.wix.com/velo/reference/wix-data/bulksave

  4. How to get data of a person (user)?
    https://www.wix.com/velo/reference/wix-users/currentuser

And this is perhaps not the fully way of doing to get your aim.
As you can see, you will have to go several steps. Do everything step by step.

  1. Do you have already a DATABASE ?

If YES:

Try to get some data out of this DB,…

import wixData from 'wix-data';

$w.onReady(()=> {myFirstFunction()})

function myFirstFunction(){
   wixData.query("myCollection") //<---change here the name of your DATABASE
       .find()
       .then( (results) => {
          if(results.items.length > 0) {
             let firstItem = results.items[0]; 
             console.log(results.items)
             console.log(firstItem)
          }   
          else {      }
       })
       .catch( (err) => {
       let errorMsg = err;
   });
}

You can test this code in the Preview-Mode in your Wix-Editor (take a look onto the CONSOLE, on the bottom of the screen.
Or use for example google-chrome and press F-12 and navigate to CONSOLE, to see the output-results.

Your first step is done, you were able to read data out of a DATABASE.

I understand, but I have a few questions:

  1. Where do I put the code? Do I have to put the code on the page I want to configure the checkboxes on?

  2. What’s the next step?

@davidkabouter1

Where do I put the code? Do I have to put the code on the page I want to configure the checkboxes on?
Before you can put in the code, you first will have to activate the DEV-MODE (developer-mode) in your Wix-Editor.

After you have activated the dev-mode, put your code into the CODE-SECTION of the Wix-Editor and then do a testing in PREVIEW-MODE → take also a look onto CONSOLE.

What’s the next step?
Your next steps should be first to learn all the stuff of the given links.

Then for example try to get some user-informations (step-2).
Open the Velo-API and search for the right API, which could be used for this scenario…

  1. How to get data of a person (user)?
    https://www.wix.com/velo/reference/wix-users/currentuser

Then do all the other stuff —> step by step

If you want to learn more, you will find a lot of interesting examples here…
https://www.wix.com/velo/examples
or also on my site…
https://russian-dima.wixsite.com/meinewebsite

Take also a look here…

And don’t forget to like it, if you really liked it :wink:

Okay. I’ll give it a try. Thanks!