Home » Developer & Programmer » Forms » Control textbox input
Control textbox input [message #397540] Sun, 12 April 2009 01:19 Go to next message
sysman2007
Messages: 24
Registered: March 2009
Junior Member
How I can control textbox input character??
for example I want user can enter only digits on a textbox.
(don't say set Data Type = Number)
Re: Control textbox input [message #397548 is a reply to message #397540] Sun, 12 April 2009 03:43 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
(don't say set Data Type = Number)

Why not? It is the easiest way to do that.

Otherwise, check input string in the WHEN-VALIDATE-ITEM trigger. This time you'll have to do it by yourself (i.e. code any logic you are interested in).

As Forms itself isn't capable of notifying you that inserted character is invalid (as soon as it is entered) (unless WHEN-VALIDATE-ITEM trigger fires), you'll probably have to do that with some Java code.
Re: Control textbox input [message #397622 is a reply to message #397540] Mon, 13 April 2009 01:19 Go to previous messageGo to next message
sysman2007
Messages: 24
Registered: March 2009
Junior Member
OK
thanks and know I must check on WHEN-VALIDATE-ITEM trigger
input character but what code must write to check inserted character?
Re: Control textbox input [message #397644 is a reply to message #397622] Mon, 13 April 2009 02:32 Go to previous message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In the WHEN-VALIDATE-ITEM trigger? Well, you might try to use regular expressions (if possible), TRANSLATE and/or REPLACE functions, LOOP through the whole string and check character by character ... There have been quite a few discussions about such an issue in our SQL & PL/SQL forum so - take a look.

If you are talking about Java, sorry - I wouldn't know.
Previous Topic: Bean issues in form 6i
Next Topic: call report 6i from Form 10g
Goto Forum:
  


Current Time: Wed Dec 07 16:12:17 CST 2016

Total time taken to generate the page: 0.16613 seconds