Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to set maximum length on TextArea element?

    How to set maximum length on TextArea element? I tried using textArea.setLength(int length) but it didn't work. I was able to enter the characters more the 'length' passed. Then I tried setEnforcedLength() method along with setLength() but that even stopped the creation of the text area in html. I couldn't find the text area in the whole page. I also tried using setAttribute('length', 320) and setAttribute('maxLength', 320) methods at different times but this also didn't work and stopped the creation of text area.

    #2
    We recommend a LengthRange validator as dynamically enforcing the length while typing can be very annoying to users. Another good alternative is displaying the current character count and maximum in an adjacent blurbItem or Label.

    If you want dynamic length enforcement anyway, setEnforceLength() is the way to do it, and we are not reproducing the claimed issue where this prevents rendering.

    Comment

    Working...
    X