Thursday, January 10, 2013

How to limit the number of characters in a DAM Dialog text field

The Problem

You want to limit the number of characters that can be entered into a DAM Dialog's text field.

The Solution

If you are using a textarea xtype, you can just add maxLength as a property with the number of characters you would like it to be limited to, set by the value. This leverages an in built validator to limit the number of characters.

1 comment:

  1. Anyidea why this property is not working when we have a textfield inside a dialogfieldset?
    Prob: field is showing red when the limit exceeds the limit but author is able to submit the dialog values.