Hello! I’m Bryce and I’m working on a Webflow site and need to access the Custom Fields to add them onto a user page.
I’m following the “custom fields” documentation listed in the sygnal documentation.
You can test my code by navigating to my site right here: m3as.webflow.io , and logging in using:
user: brycejwalter@gmail.com
Pass: Uje4rbw2979!
You will notice that I’m logging “Data”, as well as 2 custom fields if you open the console. All “Data” comes back as empty, so naturally the fields are coming back as undefined. See screenshot here:
This is my code:
<!-- Sygnal Attributes 5 | User Accounts -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sygnaltech/webflow-util@5.4.6/dist/css/webflow-membership.css">
<script defer src="https://cdn.jsdelivr.net/gh/sygnaltech/webflow-util@5.4.6/dist/nocode/webflow-membership.js"></script>
<script>
window.sa5 = window.sa5 || [];
window.sa5.push(['getMembershipConfig',
(config) => {
config.accessGroupsFolder = '/partner-dashboard';
config.accessGroups = [
'preferred', 'allied', 'associate'
];
return config;
}]);
window.sa5.push(['userInfoChanged',
(user) => {
if(user.user_data_loaded.custom_fields) {
console.log("USER DATA IS", user.data);
console.log("CALENDAR IS", user.data['calendar-embed']);
console.log("RESOURCE LINK IS", user.data["resources-link"]);
return;
}
if(user.user_data_loaded.access_groups) {
console.log("RETURNED GROUP IS", user.access_groups);
}
}]);
</script>
I can verify that the Custom Fields exist on the user object and that the Slugs are correct.
Does anybody have an idea of what I am missing?
Thanks in advance for your help.