How to limit word for title input ?

Hello brader or sister, i have custom creat content page for blog on the web and i want to limit to 6 word only for title input, Is it possible ?

If it’s a regular user input textBox you an try:

let wordLimit = 6;
export function textBox1_keyPress(event) {
    setTimeout(() => {
 let wordArray = $w("#textBox1").value.replace(/ +(?= )/g,'').trim().split(" ");
 if(wordArray.length  > wordLimit){
             wordArray.length = wordLimit;
            $w("#textBox1").value = wordArray.join(" ") + " ";
        }
    }, 10)
}

[updated, so you’ll be able to add more than limit even by copying&pasting a long sentence]

Thank you very much for this , have a nice day brader !!!

You’re welcome. Have a nice day too :slight_smile: