The most usual failure everybody do is → mixing ordinary custom code-parts with datasets+options made inside of the PROPERTY-PANEL.
However, after submitting the Form, the data from these Elements are not transferred to the Collection dataset even if they are mapped to the corresponding dataset.
After checking in Collection, these records are empty.
Why this happens?
Well, maybe because you have two different cycles running synchrounous in parralel-mode and the one overrides data of the other.
- Where is the CODE for your SUBMISSION? (Oh, you connected your submit-button directly with the dataset, i undertand )

What? You don’t have a code for submission?
Wait, you setted it up inside of the PROPERTY-PANEL of your connected DATASET ?
Am i right?
This is all the code (provided by you), which i can find…
import {currentMember} from 'wix-members';
$w.onReady(function() {
currentMember.getMember()
.then((member) => {
let firstName = member.contactDetails.firstName;
let lastName = member.contactDetails.lastName
console.log("First-Name: ", firstName);
console.log("Last-Name: ", lastName);
$w('#MemberName').value = `${lastName} ${firstName}`;
$w('#MemberEmail').value = member.loginEmail;
return member;
})
.catch((err)=> {console.error(err);});
});
…so i asume you did all the rest of your setup, with the help of dataset-connections and the ussage of setting-options inside the dataset’s PROPERTY-PANEL.
And now you are expecting that this MIXED-VERSION will work without any problems???
WRONG !!! ----> it won’t !!!
But how to solve it now? → Do we need something like → onBeforeSubmit <— do something???
But when we check the Wix-API → we won’t find such a possibility!
So what now?
But wait, i have something in my nose…, i can smell it already, wait wait…
-----> YES, that must be the right path ----->