Forum Academy Marketplace Showcase Pricing Features

Sending text from a repeating group text field to another text field on page


I have a RG, and it pulls data from my database and display it on a page. I have created a button in this same RG in the same row next to the RG text field called ‘Restore Version’. The idea is that when the user clicks this button, the text being displayed in that RG row will be ‘transferred’ or shown in the rich text editor also on this page.

Think of the RG as a list of previous submissions to an answer and the button allows the user to scroll through their list and restore a previous answer to the text editor field.

Set a state on the button click. Then the rich text editor can refer to the state for the text to display.

Would that work for your use case?

Learn no code →

What would be the state the buttons takes on? The content of the text field in the RG?

I’m wondering whether it would be scalable to lots and lots of records - wouldn’t the rich text editor need to know up front of all the multiple states the buttons will take?

Use an element outside of the RG to hold the state. Or the RG itself.

The state would hold the repeating group cells content (if you’re updating something in that content).

It’s scalable as states are temporary values (while the user is on the page). Once the user leaves the page, that state is emptied.

And no, the rich text editor does not need to know all the states. I would use the same state for all of the repeating group entries.

This topic was automatically closed after 70 days. New replies are no longer allowed.