Can I add a scroll bar to a text box linked to a data set?

Is there a solution to this problem yet? I have a repeater refering to a dataset with a field called description. These texts are of variable lengths. Since my layout does not permit all these different lengths to be accomodated, I need a scroll bar for each text depending on the length of the text. Is it possible to achieve this through a code or are there any buttons i could link to show parts of these?

Please refer to the image attached and how the text flows below the footer. There are certain projects which have much more lengthy text.

Hey
I would add an iframe HTML Component as display the text inside that, then it will scroll. But, you can’t add a HTML Component into a repeater so you will need that to be outside the repeater. use the postMessage to send the description content into the HTML Component and render it with any CSS & HTML you feel fit your purpose inside the HTML Component.

Hi Andreas,

Thank you for your prompt response. I need some further help in the page code. So far I have added an iframe which retrieves and displays the postmessage data. This part works with the following code:

<!doctype html>

Message will go here

The page code is as following and I am pretty sure its a syntax error with the #textDescription. If I enter ($w(“#textDescription”).value) it says that it must be a string or object. It does not work with .string either. My dataset (Hospitality) is inserted into the page and teh item is Description. Could you provide any help?

$w.onReady( function () {

$w(“#html1”).postMessage($w(“#textDescription”));
})

Ok. So I got it to work somewhat with the following code, thanks to Mikhail’s reply to looloo’s post :https://www.wix.com/code/home/forum/questions-answers/dataset-with-html-component

$w.onReady( function () {
//TODO: write your page related code here…
});

export function dynamicDataset_ready() {
console.log(“dynamicDataset_ready”);
var link=$w(“#text4”).text;
console.log(link);
$w(“#html1”).postMessage(link);
console.log(“dynamicDataset_ready:End”);
}

I still have the following issues:

  1. In preview mode, the text appears for the first page but when I change it to the next entry of the dynamic set, the text flashes before disappearing.

  2. Paragraph changes are lost somewhere between the translation from WIX to HTML.

This is an urgent assignment and I need immediate help. Any reply would be greatly appreciated.

Could you tell me if the Page code is ill-timed or the html code?

Hey Kiran,
Regarding (1), I’m not sure the onReady is the right event you want to use for setting the text in the external HTML component, as this would only be run once (when the dataset is ready after the page was loaded). Maybe onCurrentIndexChanged will do a better job.
Regarding (2), maybe try using $w(" #text4 "). html instead of the ‘text’ property.

Since the last discussion was in 2018, and now it is 2021, the solution may not be for them, but for future reference for other uses.

Check if this is the solution you are looking for:
MBBS (Bachelor of Medicine Bachelor of Surgery) Section in https://www.mbbskrasnoyarsk.com/

Our solution was, use a table, and connect to a dataset, for each cell in the table, put online one line of data, so that text displayed works seamlessly.

If anyone has faced an issue using this approach, then let me know by commenting here.