How to display a custom OneDrive folder ID from a member profile on a Webflow page? Answered

Post author
Amir Zamani

Hi All - Can anyone please assist, I am trying to pull in a custom field called "OneDriveFolderID" and simply display that information from the member profile onto a webpage in a small box on Webflow. I already figured out how to dynamically pull the Member ID and display it, but I cant get it to show a custom field. Here is the code I used to pull in the member ID dynamically depending on who is logged in:

window.$memberstackDom.getCurrentMember().then(({ data: member }) => { if (member) { let id = member.id // do something with the id } })

Comments

3 comments

  • Comment author
    Raquel Lopez

    If you're not to familiar with Javascript, it's easier if you add a data attribute to the html and the custom field be used as value.

    For example you can add the first name to a h1 

    <h1 data-ms-value="one-drive-folder-id">Whatever you write here will be replaced</h1>

    Check your custom field id, since its saved using kebab case instead of camel case.

    https://docs.memberstack.com/hc/en-us/articles/19395405347739-Displaying-Member-Data-with-Data-Attributes

    0
  • Comment author
    A J

    Hey Amir Zamani, just to add on to what Raquel said. There's just a little typo in the attribute name above, so you can have the attribute name as data-ms-member and have its value as the custom field ID of the field you want to display.

    0
  • Comment author
    Raquel Lopez

    Thanks AJ 😆

    0

Please sign in to leave a comment.