You should first make clear if you want to go the Wix-Data-way or if you want to use a DATASET. It always ends in issues and problems when you try to mix both, especialy when you do not really understand what you are doing.
When I test it does the name also disappear when saving the data? How can I solve both of those?
As you can see, your problems already begins here.
So let’s make clear, what exactly you want to achieve first.
- IDENTIFYING CURRENT LOGGED-IN-USER:
wixUsers . currentUser . id
- You want to find data of this user out of the Private-Members-Data
wixData.query("Members/PrivateMembersData")
.eq("_id", wixUsers.currentUser.id)
.find()
.then((results) => {
................
}))
Let’s say it worked and you got your data.
3) You paste this gotten data-value into a n INPUTFIELD, which is connected through a dataset (let’s say → “dataset1”) to a database in the background.
$w('#text10').text = results.items[0].nickname;
We can see it here that this INPUTFIELD is connected…
… to a dataset (in this example it will be —> “dataset1”
- Now your wish will be, to save this found value(s) inside of your database, which is connected with(trough) “dataset1”.
But the problem is, that for sure your “SUBMIT-BUTTON” is also connected to the dataset inside of the PROPERTY-PANEL. And here your PROBLEM begins!
Maden connections trough the propertypanel, have their (i call it) own LIFE!
So if you press the SUBMIT/SAVE-BUTTON, nothing really happens, right?
Or at least something unexpected happens.
To make sure everything works the right way, you can either code it, or you can try to modify your SETUP as following…
- CHECK if your DATASET-SETTINGS are settep-up as “READ”
This will make sure, that your inputfield will work and will accept the ID.
Now your ID should be visible inside of the INPUT-ELEMENT…

2) Make sure that your SUBMISSION-BUTTON, is connected to dataset and setted-up for SUBMISSION inside of the dataset-options…
This makes sure to start the saving process to the database which is connected to the dataset1.
Also you have to set up the right data-field where the data (inside of the PROPERTY-PANEL) of the INPUT-FIELD, will have to go to, like shown in the following expample…
In this case we selected DATAFIELD → “TITLE”
So what happens next ?
Let’s press the SUBMIT-BUTTON…

Now the data should go directly to our (in the background placed) database, by a click onto the SUBMIT-BUTTON… let’s have a look…into database…
Et, voilà!!!
The data is already inside of your DATABASE. In the → “Title-Field” like shown on the pic.
So what was the question now?
HOW TO DELETE THE VALUE INSIDE OF THE INPUT-ELEMENT AFTER SAVING-PROCESS???
Like this…
import wixUsers from 'wix-users';
$w.onReady(async function() {console.log("Dataset ready...");
$w('#dataset1').onReady(async()=>{
let currentUser = await wixUsers.currentUser.id; console.log(currentUser);
$w('#input1').value = currentUser;
});
});
HOW NOT TO DELETE THE VALUE INSIDE OF THE INPUT-ELEMENT AFTER SAVING-PROCESS???
Like this…
import wixUsers from 'wix-users';
$w.onReady(async function() {console.log("Dataset ready...");
let currentUser = await wixUsers.currentUser.id; console.log(currentUser);
$w('#input1').value = currentUser;
$w('#dataset1').onReady(()=>{
//your further code here...
});
});