Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Limit TextField to specifc number of lines

$
0
0

Hi,

First of all the limit to character number is not enough for my case. I would like to make sure that the user won't be able to enter more than 3 lines of text. In addition the field can be either filled in directly or using two other fields + button (as you can see below).

I managed to limit the amount of text that user can enter into the field by using the following two lines of codes:

 

Initialize:
this.maxH = "18mm"; //3 lines

 

Full:

xfa.event.change = "";

 

and checking those two checkboxes in the "Object/Field":

[x] Allow Multiple Lines

[x] Limit Lenght to Visible Area.

 

and in the "Layout" under height:
"9mm" / Expand to fit.

 

This works fine until I use a button that populates this field with content from another two fields:

 

Script in the Click event of a button:

var something = TextField2.rawValue + TextField3.rawValue;

TextField1.rawValue += something;

 

The above two lines "do not care" about the script of TextField1 in the Full event.

Is there a way to check if the "TextField1.rawValue += something;" will cause the TextField1 to overset the text and display an alert instead?

 

The LCD version i'm using is: 9.0.0.2.20101008.1.734229

 

Many thanks for your help


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>