@russian-dima Below is my current code. Yes, my custom fields already exist in my contacts. I did check and make sure that the key:value is exacly as it is typed in my contacts fields list.
import wixUsers from ‘wix-users’ ;
import wixWindow from ‘wix-window’ ;
import wixLocation from ‘wix-location’ ;
$w . onReady ( function () {
$w ( ‘#register’ ). onClick (()=>{ console . log ( “Register-Button clicked” )
let Rank = $w ( ‘#Rank’ ). value ;
let firstName = $w ( ‘#firstName’ ). value ;
let lastName = $w ( ‘#lastName’ ). value ;
let Consistory = $w ( ‘#Consistory’ ). value ;
let email = $w ( ‘#email’ ). value ;
let password = $w ( ‘#password’ ). value ;
let labels = ;
// const Rank = $w('#Rank').value;
// const Consistory = $w('#Consistory').value;
// register as member using form data{
"contactInfo" ; {
"Rank" ; ( $w ( '#Rank' ). value ),
"firstName" ; $w ( '#firstName' ). value ,
"lastName" ; $w ( '#lastName' ). value ,
"Consistory" ; ( $w ( '#Consistory' ). value )}
wixUsers . register ( email , password , {
contactInfo :
{
"Rank" : [ Rank ],
"firstName" : firstName ,
"lastName" : lastName ,
"Consistory" : [ Consistory ]
}
})
. then (( result )=>{
let resultStatus = result . status ; console . log ( resultStatus )
wixWindow . lightbox . close ();
wixLocation . to ( "https://info508482.wixsite.com/orient-of-in" );
})