Where is users company name stored?

I’d like to get the users company name that was filled in at the users registration.
I can not find where it is stored and how it is retrieved with velo.
I know how to get the users email, name, etc. but I can not find the value of users company.
Any ideas?

Hi @smens :raised_hand_with_fingers_splayed:

How did you collect the user’s company? With Wix Forms? Or via a custom registration flow? Please also share your code so we can understand better what’s going on.

@ahmadnasriya with a custom registration form.

@smens We still need to see your code

No code used. Did it by adding a new field in member management registration fields.

You said custom registration flow, did you mean Wix Forms?

I have a custom registration form. In member management i can add further fields for that registration form. Once a member registers there is now my new company name field. Check www.musicscoodle.com

Thanks for you effort!

@ahmadnasriya Sorry for being so unspecific, I was away from my desk.
Here is what I did:
I went to “Site members” on the Settings Page of my website musicscoodle.com
Screen 1


and then clicked on “Manage Member Info”. There I clicked on “Add More Fields”


Now I added the field “Company”…


…which now appears on my Signup Dialogue:


“Unternehmen” = Company in German.
I edited the field Palceholder in the editor. I did not manually add the field here, it appeared by itself (which is great). I only edited the placeholder name and retuned the position of the field in this Custom Signup Form:


After I created a new user the Company Info was perfectly stored and appeared on the users “My Account”-Page.

I could not find the database or any info about where this “Company” property of a user is stored.
In my code I would like to set certain parameters depending on the users company. But how can I get the value of the “Company” when a user logs in?
There is no column in the content collection "PrivateMembersData or any other accessible member content collection.
Where is “Company” stored and how can I retrieve its value? I know how to query values in code, etc; but for that I need to know where to look for that value. That’s why I can not provide any code so far.

Thank you for your help!

Ok, I figuerd it out:
The Company field is stored in the Contacts list of your website.
To make it visible in that list you must adjust the visible fields.


Retrieve the company value of a user the following way:

I created a getContact.jsw file in the backend files that contains the following code:

//BACKED FILES CODE
import { contacts } from ‘wix-crm-backend’ ;

export function myGetContactFunction ( id ) {
const contactId = id ;
const options = {
suppressAuth : true
};

return contacts . getContact ( contactId , options )
. then (( contact ) => {
return contact ;
})
. catch (( error ) => {
console . error ( error );
});
}

On the Velo Code on the page:
import { myGetContactFunction } from ‘backend/getContact’ ;

$w . onReady ( function () {
user = wixUsers . currentUser ;
userId = user . id ;

myGetContactFunction ( userId ). then ( res => {
console . log ( "res: " + res . info . company );
})
});

Find more infos on:
https://www.wix.com/velo/reference/wix-crm-backend/contacts/getcontact
There is also a list on other properties for the contact

How can I call the company name so that it can show in a text box?

OOOH MYYYYYY
Stefan i’ve been looking for this for DAAAAAYYYYYSSS
Had exactly the same problem…

Thank you !!!
I’ve tried all other Member related backend lists

Follow my advice in the post from Jan. 06.
At the bottom of the code you find a line that says:
console . log ( "res: " + res . info . company );

Replace this line with:
$w(“#THENAMEOFMYTEXTBOX”).text = res . info . company:

whereas THENAMEOFMYTEXTBOX is the name that you give your textbox when you add it to your site.
That should do the trick.

1 Like

Hi Stefan, yes it worked! i totally missed it. thank you very much for your time!!