I have a collection that stores a text, the user’s biography.
And I wish I could only show part of that text on a dynamic page.
For example:
Would it be possible to do so.
Thank you in advance
Tomás Martins
I have a collection that stores a text, the user’s biography.
And I wish I could only show part of that text on a dynamic page.
For example:
Would it be possible to do so.
Thank you in advance
Tomás Martins
Yes. It is possible:
let numberOfCharacters = 15;
$w("#repeater1").onItemReady(($item, itemData, index) => {
$item("#text1").text = $item("#text1").text.substring(0, numberOfCharacters ) + "...";
})
and if it’s not a repeater, it’s even easier.
const numberOfCharacters = 15;
$w("#text1").text = $w("#text1").text.substring(0, numberOfCharacters) + "...";
//put all of this inside the $w.oneady() and dataset.onready();