Repeater updating not working

I’m trying to code my website so when I press a button on one page, a term connected to that button appears on a display page. I’m using a repeater so the terms appear next to each other, but whenever I press a button instead of showing the term it just shows the entire repeater template.

This is my code for the display page:

When I check my logs, it says the data is properly stored, and it does say it updated the repeater, but it updates it with “undefined”.

Suggested way to do what I think you are trying to do.

option 1,

Use a light box

Have each button pass in its ‘key’ to a Lightbox.

The Lightbox runs the code (adjusted) to retrieve the data for that key and display it.

option 2,
Session storage

Have each button pass its ‘key’ to a session storage item.
Making sure that is done in an async function where the session key is set is confirmed before we then open the new page.

Then when the second page opens . That page retrieves the key from the session storage and and runs the code (adjusted) to retrieve the data for that key and display it.


But this is all assuming what you are trying to do…

Please explain in more detail , button on one page and display page.

I.e.
You click a button on page 1, which runs this code and also navigates to another page, where the results of the code should be displayed?

Please explain how you are passing the data to that second page as I do not see anything in this that does that.


Also its a lot easier for us to figure out coding issue if it is done inside a code block in the page rather than an image.

You simply copy and past the code int the post, select it all (the pasted code) and click the code button. This will put it in a code block where we can the copy it a look or test it in more detail.