These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Handle overflow of Text fields

ninadsd
Registered: Oct 2 2008
Posts: 6

Hi,

I am setting the value of the text field using script (rawValue property). I would like to detect when the text filed overflows.

There is a "Limit length to Visible Area: property, but this works only if the field is filled manually, not when it is assigned through script. Also the "full event" is not raised as it is an interactive event.

Is there any way to find out the overflow of text fields when set through script?

Font is set to Arial and I cannot change the font to monospaced due to requirements.

Thanks.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can use FormCalc to detect number of characters in the textfields.
If the string has more than 30 characters for examples, you can create a message for the users.

if (Len(Textfield1) > 30) then
$host.messageBox("Too much characters")
endif

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs