I am trying to access a custom field from the members table. It keeps returning Undefined, although when I try accessing the MemberID or other non-custom fields, everything works fine (thus, it is getting the member adequately.) Here is the code:
import wixMembers from ‘wix-members’;
import { currentMember } from ‘wix-members-frontend’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
I actully figured it out. It appears that the actual usage is now much more straightforward. Apparently the API has been updated without the documentation changing
instead of the previous:
$w(‘#text15’).text = member.contactDetails.customFields[“customfields_contact_company”].value
you can now just use:
$w(‘#text15’).text = member.contactDetails.company