Skip to main content
Adirai Maji
Inspiring
March 6, 2020
Question

Is there a way to limit number of characters in an edittext field in scripting?

  • March 6, 2020
  • 0 replies
  • 189 views

I want to limit the number of characters for edittext . Is there any way to do it?

 

I'm using onChanging() function to achieve this.

edittext.onChanging = function(){
 edittext.text = edittext.text.substr(0,1);
}

 

But I want to know is there any easier way to do this? In addition can you please explain what's the use of

edittext.characters

 

This topic has been closed for replies.