I’m using a webflow form to let users update their profiles.
The form auto populates its fields using ms-fields attributes.
After the user submits the form I’m redirecting them back to the homepage by setting the URL Redirect
attribute to \index.html
Everything works fine.
However, once the homepage loads the the member.id
that’s supposed to come from the memberstack front end API is empty.
This is the code I’m using to get the member.id
window.addEventListener('DOMContentLoaded', (event) => {
MemberStack.onReady.then(function(member) {
if (member.loggedIn) {
LoggedUserID = member.id;
console.log(LoggedUserID);
};
})
});
It’s weird because the only time the member.id
is empty is right after the form submission.