WIX CRM - Sign Up Page

I have a sign up page with the code below. Everything is working right. Contacts and Members are showing in the Members and Contacts List with the information in the right custom fields. However, there is one field I cannot figure the value of and that is the Address field (street, city, zipcode…).

What is the right syntax or field value of the Address field?

$w.onReady( function () {
$w(‘#submit’).onClick( () => {
let email = $w(‘#email’).value //correct
let password = $w(‘#password’).value //correct
let firstName = $w(‘#firstName’).value //correct
let lastName = $w(‘#lastName’).value //correct
let phone = $w(“#phoneNumber”).value
let street = $w(“#street”).value;
let city = $w(“#city”).value;
let state = $w(“#state”).value;
let zipCode = $w(“#zipcode”).value;
let company = $w(“#companyName”).value; //correct
let companyType = $w(“#employerType”).value;//correct

wixUsers.register(email, password, {
contactInfo: {
“firstName”: firstName, //correct
“lastName”: lastName, //correct
“phones”: [phone],
“street”: street,
“city”: city,
“state”: state,
“zip code”: zipCode,
“company”: company,
“Company Type”: companyType,

} 

} )

Hi,
What isn’t working for you? do you have any errors in the browser’s console?

Hi Or,

Thank you for getting back to me!
When members enters their ADDRESS information (city, street, zip code) in the custom sign up page, it doesn’t work. Everything else appears in their Contact information including custom fields EXCEPT their address information.

So my question is what are the Field keys for the Street, city, state and Zip ?

There is no error in the console.

1 Like

I have the exact same question. The help files show ContactInfo {firstName: string, lastName: string, picture: string, emails: Array, loginEmail: string, phones: Array, labels: Array, language: string, customFields: string | number | Date}
But how do we write to the address fields? are they labels or custom fields? or part of the ContactInfo?

1 Like

I built the code listed with the DB, and using the page code listed i get a Parsing error: unexpected token at the last ) bracket. I removed the company and the company type just to speed up things.


So i don’t know if that is causing you issues and just not showing up, or what the cause is of that


this is the preview page errors

Still no answer regarding this :confused:

I actually got this to work, the signups register in the CRM with all the data. here is the code i am using and screenshots. Hope it helps.

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixUsers from ‘wix-users’;
import wixLocation from “wix-location”;
import wixWindow from ‘wix-window’;

$w.onReady( function (){

$w(‘#submit’).onClick(() => {
wixUsers.register($w(‘#email’).value, $w(‘#password’).value, {
“contactInfo”: {
“firstName”: $w(‘#firstName’).value,
“lastName”: $w(‘#lastName’).value,
“phoneNumber”: $w(‘#phoneNumber’).value,
“street”: $w(‘#street’).value,
“city”: $w(‘#city’).value,
“state”: $w(‘#state’).value,
“zipcode”: $w(‘#zipcode’).value,
“password”: $w(‘#password’).value
}
}).then(() => {
//Everything went good, user was registered, now going to redirect
console.log(‘user registered successfully’);
wixLocation.to(‘/plans-pricing’);
}). catch ((err) => {
//If there is an error it will not redirect, it will console.log the error
console.log(${err}: Error)
});

});
});

Thank you for your reply dragonlord. Did you set up custom fields for those or are you writing to the default address fields?
I added custom fields that I can write to called HomeStreet, HomeCity, etc as you can see below, but they don’t populate the main CRM list or the top address fields (see below)

1 Like

yes i added the fields, just make sure your contactInfo names in your page code matches the fields exactly, uppercase lowercase all of that.

@dragonlord4469187 ok thank you. That is a “work-around” and not a solution. I, and I believe the OP, are looking to update the main field so it shows up on the CRM contact list. But thank you for your help :slight_smile:

@trisha I see what your getting at. A thought i just had on this, you might try in the user profile member page adding the corresponding fields as if your user wanted to update their information and see if that will populate the default fields. If it does, then the next step would be how to achieve the same result but outside the members area.

@dragonlord4469187 I have done that, and it does update them, but I can’t see their code. I’ve asked support but they won’t say, they keep saying to ask on the forum.

Maybe one of the Wix coders will see this post and chime in. has anyone tried doing the form on a dynamic page? I don’t know that it would make any difference but i thought i read somewhere that the member pages were dynamic pages. If that is true, then maybe there is something special with how dynamic pages gets handled by the CRM? IDK, just grasping at straws.

Wix, please tell us how to add address to the standard Wix contacts.

Old post from 2018 reappearing, closed.

This previous forum post will help too.
https://www.wix.com/corvid/forum/community-discussion/member-s-collection-address%3Fpage%3D1%26dl%3D5ce7fb33227f2d0016962c8b%252F5ce333e054670c00a4d64602%252F2