attr maxLength not sent to client except when widget supports it

0
Hi. We need to check that data entered in Rich Text widget fits in the string attribute. We need to do that on client. I wanted to create a Javascript action that takes the MxObject and Name of the attribute and does that, but I learned that the client API does not provide the information about the maximum length of the attribute. I checked where the regular text input retrieves this information and found that it’s only sent to the client as part of the page xml when it contains a widget supporting the maxLength property. My plan now is to make a one-time server call that retrieves this extra metadata when the Javascript action is called for the 1st time. Is there a simpler solution?
asked
1 answers
0

Simple though effective advise

When using a rich text widget ALWAYS set attribute length to unlimited. Since formatted text contains HTML tags. Making a simple text bold will result in reasonable amount of extra characters.

answered