(RPG) OnReturnKey in iphone

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
DavidS
Posts: 15
Joined: Wed Jan 22, 2014 7:41 pm

(RPG) OnReturnKey in iphone

Post by DavidS »

I'm currently working on a data entry program and have encountered an issue with iphone/ipad keyboards that I'm hoping someone will have a workround for.

The user currently enters their location and a document number, they've requested that once the document number is entered it automatically takes them to the next screen. To do this I've enabled "OnReturnKey" for the field and tested this on various android devices without issue, however because it is a numeric field apple devices apparently don't have a "next/go/enter" key on the number pad.

I tested changing the field from numeric to another data type to get the full keyboard up, however the apple devices then treated the field as being full of blanks (user doesn't want a field of zeros so combination of edit keywords and clear field,) and so the user has to backspace to clear the field before being able to enter the number.

Has anyone had similar experiences and got another keyword I could use for the same effect? I also tried OnValueChange but this still needs the user to do something to trigger it.
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: (RPG) OnReturnKey in iphone

Post by tsupartono »

David,
There is indeed a way to change the input type to number, without changing the keyboard to numberpad.

But before we go there, I'm wondering about what you said: "I also tried OnValueChange but this still needs the user to do something to trigger it".
If you set the OnValueChange handler, the form should get submitted when the user types in a document number and touches the "Done" button above the keyboard:
1.PNG
1.PNG (15.25 KiB) Viewed 3231 times


If you'd still like to have the normal keyboard (not numberpad) while still retaining the number data type, you can do that by using a different set of properties (instead of 'DataType' property).

The 'DataType' property is basically a shortcut, which change several behaviours of the textbox (keyboard type, value format, display format).

By not using the 'DataType' property, you would have finer control as you can explicitly set the properties to control the input type, value format, and display format for number.

Have a look at the documentation below for more details:

http://www.longrangemobile.com/docs/LRP ... displa.htm

An example of usage:

Code: Select all

     A            QUANTITY      80A  B  4  5
     A                                  4  5HTML('
     A
     A                                       Type:TEXTBOX
     A                                       ShowClearButton: Y
     A                                       OnReturnKey: SUBMIT
     A
     A                                       TextInput.Type: NumberTextInput
     A                                       TextInput.MaxFracDigits: 2
     A
     A                                       DisplayFormat.Type: NumberTextFormat
     A
     A                                       ValueFormat.Type:NumberTextFormat
     A                                       ValueFormat.MinIntDigits:8
     A                                       ValueFormat.MinFracDigits:2
     A                                      ')
DavidS
Posts: 15
Joined: Wed Jan 22, 2014 7:41 pm

Re: (RPG) OnReturnKey in iphone

Post by DavidS »

Thanks for the reply, lesson of the day "get multiple users to test something before deciding it doesn't work" not owning any apple device myself I'm working on feedback alone and having asked more users the OnValueChange tag does seem to do what we're after in the program.
Post Reply