Any way to reference a specific CMS element in a dynamic On Click JS Function?

I have a CMS powered “guest entry” section on my site where users can post about their experience, and generate an element on the page in a div block that displays their name, info, and text content about their experience.

I have a button within the div that I need to call a function when clicked to generate a printable PDF with the information that is in that specific entry or div that the user clicked the button on.

Since I can only technically assign one ID to this button since it automatically assigns it to the rest of the buttons within the rest of the divs, is there anyway I can create a dynamic function that calls the specific div that the button is located within?

I know there are IDs assigned to the items within the Webflow CMS, anyway to reference this other than using the specific ID within the Webflow CMS so that it is dynamic?