textbox Field Length

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
esdaled
Profound User
Posts: 72
Joined: Fri May 08, 2009 2:43 pm
First Name: David
Last Name: Esdale
Company Name: Guardian General Insurance
City: Port of Spain
State / Province: Outside Canada/USA
Country: Trinidad and Tobago
Location: Trinidad
Contact:

textbox Field Length

Post by esdaled »

Is there a way to control the field length of a textbox (number of characters which can be typed into) so that the user is autotabbed to the next field when a character is typed beyond the length?

It seems that the length of a textbox is linked to length of the bound value.

Due to the restrictions of external systems that we interface with, the length of a name field on a display field needs to be restricted based on the destination system. I can edit the length in the RPG code, but it would be nicer to also restrict the user input on the rich display file.
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: textbox Field Length

Post by Glenn »

As you discovered, the framework will stop you from typing past the length of the bound field. If you want to override that without effecting the bound variable you could put something like the below in the 'onfocus' event of your textbox. The example code will change the 'maxlength' attribute of the textbox to 5.

Code: Select all

this.maxLength = 5;
To get the "autotabbed" behavior you can use the 'auto tab' setting shown in the doc page below.
http://www.profoundlogic.com/docs/display/PUI/Auto+Tab

Glenn
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest