top of page
Restrict amount of character
Input-Text
"Here you have your Text (String-lement) with more than 300-characters, for example. You will cut it when the length of 300-characters is arrived. I do not now how much characters has this example-text here, but we will restrict it to only 100-characters. I hofe everything will work like a charm xDDDDDDD"
Output-Text
Here you can restrict the Text-length to your specific value.
.
CODE

$w.onReady(function () {});
export function button1_click(event) {
let myValue = $w('#input1').value
let fullText = $w('#text1').text
let shortText = fullText.substr(0, myValue) + "...";
$w('#text2').text = shortText
}
bottom of page