Hi wix experts
I am trying to build my own signup form.
It works fine, I can pass in options except I cannot get a custom member field (“custom_memberno”) to get saved.
Anyone knows how to correctly use customFields in options when registering new users?
My code is below:
import { authentication } from 'wix-members-frontend';
import wixLocation from 'wix-location';
$w.onReady(function () {
$w('#registerNow').onClick(function () {
let email = $w('#registerEmail').value;
let password = $w('#registerPassword').value;
let options = {
contactInfo: {
firstName: $w('#registerName').value,
lastName: $w('#registerLastname').value,
customFields: {"custom_memberno": "12345"}
},
privacyStatus: "PRIVATE"
}
authentication.register(email, password, options)
.then((registrationResult) => {
wixLocation.to('/')
})
.catch((error) => {
console.error(error);
});
})
});