Posts: 288
Threads: 0
Joined: Mar 2018
Reputation:
29
Location: Franca-São Paulo-Brasil
You can try something like this in your IWedit OnHTMLtag for numeric keyboard in Mobile:
Code: procedure TIWF_Menu.IWEdit1HTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.AddStringParam('inputmode', 'decimal');
ATag.AddStringParam('pattern', '[0-9]*');
ATag.AddStringParam('autocorrect', 'off');
end;
No tested, but I think if you correct define DataType = stTel or DataType = stEmail, etc, mobile keyboard showed based on DataType you choose.
Posts: 114
Threads: 32
Joined: Dec 2019
Reputation:
1
Location: Россия
07-28-2021, 06:02 PM
(This post was last modified: 07-28-2021, 06:13 PM by Сергей Александрович.)
I'm sorry, I didn't understand where to set the DataType = stTel type ... There is no such property in TIWEdit...
procedure TIWF_Menu.IWEdit1HTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.AddStringParam('inputmode', 'decimal');
ATag.AddStringParam('pattern', '[0-9]*');
ATag.AddStringParam('autocorrect', 'off');
end;
It works!
But what if this option is used for input:
Mess := 'Enter the PIN code to log in (numbers only)';
WebApplication.ShowPrompt(mMess, 'ClbPinWork', 'Authorization',", 'Ok', 'Forgot PIN');
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
IIRC there was a demo showing how to handle TAB as ENTER. I'll have a look and get back to you. Maybe we can introduce something to help you with this case... let's see.
Regarding smartphone, this is another completely different subject, unfortunately.
Some phones have the tab key (e.g. some Samsung models), some don't (my Android phone doesn't have it)... so it is completely unreliable. Seems that companies expect smartphone users to handle the navigation in a point/touch way, instead of using the keyboard.
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
(07-28-2021, 06:02 PM)Сергей Александрович Wrote: I'm sorry, I didn't understand where to set the DataType = stTel type ... There is no such property in TIWEdit...
procedure TIWF_Menu.IWEdit1HTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
ATag.AddStringParam('inputmode', 'decimal');
ATag.AddStringParam('pattern', '[0-9]*');
ATag.AddStringParam('autocorrect', 'off');
end;
It works!
But what if this option is used for input:
Mess := 'Enter the PIN code to log in (numbers only)';
WebApplication.ShowPrompt(mMess, 'ClbPinWork', 'Authorization',", 'Ok', 'Forgot PIN');
There is, in newer IW 15. What's the version you have installed?
Posts: 114
Threads: 32
Joined: Dec 2019
Reputation:
1
Location: Россия
IntraWeb Version: 15.1.10
Posts: 114
Threads: 32
Joined: Dec 2019
Reputation:
1
Location: Россия
Install the latest version of IW. I see that there is another parameter in ShowPrompt. How to specify it?
WebApplication.ShowPrompt(mMess, 'ClbPinWork', 'Authorization',", 'Ok', 'Forget PIN', ?????????);
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
It is optional. The default is nil. If your code was working before without it, leave it as is.
Posts: 114
Threads: 32
Joined: Dec 2019
Reputation:
1
Location: Россия
08-08-2021, 10:20 AM
(This post was last modified: 08-09-2021, 10:09 AM by Сергей Александрович.)
(08-08-2021, 07:31 AM)Александр Мачадо Wrote: It is optional. The default is nil. If your code was working before without it, leave it as is.
I need to control the display mode of the virtual keyboard. What parameters do I need to set to display the keyboard in digital input mode? What parameters are generally possible?
Posts: 2,299
Threads: 202
Joined: Mar 2018
Reputation:
87
Location: Auckland, New Zealand
I guess you mean this?
"I need to control the display mode of the virtual keyboard. What options do I need to set to display the keyboard in numeric input mode? What parameters are generally possible?"
Please post your questions in English. You can use Google Translator (as I did) and it will be good enough.
Regargind numeric keyboard for mobile, IWEdit if you set DataType = stNumber, mobile browsers will automatically display the numeric keyboard. There are also other options for other data types
Posts: 114
Threads: 32
Joined: Dec 2019
Reputation:
1
Location: Россия
08-09-2021, 10:05 AM
(This post was last modified: 08-09-2021, 10:06 AM by Сергей Александрович.)
Alexander, thank you for your answer. The translator I use lets me down... I insert the text in the response in English (already ready to send), and the translator translates it into Russian again... Now I will closely monitor this...
DataType = stNumber, - Great!
What other types are possible?
|