Page 1 of 2
Numeric string input

Posted:
28 Feb 2014 14:58
by magosk
I have two cases where I want to set up TIWCGJQMEdit controls for a "numeric string" input, i.e. the user should be able to enter 0 or more digits into the input field, and thus I want the keyboard on the device to display only a numeric keyboard. Note that jqmetNumber does not seem suitable for this, as it is made for entering a numeric value (it displays '0' by default, has a notion of min and max value, and does not allow an empty string). Case 1 is exactly as described above, in case 2 I want the input to be a "numeric password" (like a PIN code). From looking at JQM docs, I tried with using jqmetText and jqmetPassword respectively, and setting EditPattern = '[0-9]*', but this does not work for me.
Is there a way to configure the edits to work as described above? If not, can you add new edit types "jqmetNumericString" and "jqmetNumericPassword" to the component?
Using 1.9.0.3373, IW 12.2.27, Delphi XE.
Best regards
Magnus Oskarsson
P.S. I am off on vacation next week, so unless you reply extremely quickly, I won't be able to provide any feedback until the week after that.
Re: Numeric string input

Posted:
03 Mar 2014 10:46
by Alexander Bulei
Hi magosk,
1st case :
We will implement new property to allow init with empty string.
2nd case:
Well, from jquery mobile docs, attribute "Pattern" works fine only in iOS, and doesn't work in Android.
We will try find another way to do it asap.
Note: Your request is registered in our system with Ticket #295.
Best Regards.
Re: Numeric string input

Posted:
05 Mar 2014 19:27
by Alexander Bulei
Hi magosk,
About 2nd question, by jquery team members, at this moment it's impossible to do that.
In webkit browsers, you can set the edit as "number" and apply the css style:
css code
.maskinput {
-webkit-text-security: disc;
}
Best Regards.
Re: Numeric string input

Posted:
14 Mar 2014 15:06
by magosk
cgdevtools wrote:1st case :
We will implement new property to allow init with empty string.
Do you know when this will be implemented? (I cannot see anything yet in the change log about it)
cgdevtools wrote:2nd case:
Note: Your request is registered in our system with Ticket #295.
Hmm, I cannot see any tickets with this high number in the feature/bug tracker. Am I looking in the wrong place?
Re: Numeric string input

Posted:
14 Mar 2014 15:09
by magosk
cgdevtools wrote:Hi magosk,
About 2nd question, by jquery team members, at this moment it's impossible to do that.
In webkit browsers, you can set the edit as "number" and apply the css style:
css code
.maskinput {
-webkit-text-security: disc;
}
Best Regards.
Forgive a basic question: where exactly would I apply that css code? Also, will a non-webkit browser just ignore that code, or will it give an error?
Re: Numeric string input

Posted:
14 Mar 2014 16:35
by Jorge Sousa
Hello
create a css file and load it useing ServerController.StyleSheet, IWForm.Stylesheet or IWForm.ContentFiles or event IWForm.PageContext.AddLink
Re: Numeric string input

Posted:
25 Nov 2015 16:45
by assapan
magosk wrote:cgdevtools wrote:1st case :
We will implement new property to allow init with empty string.
Do you know when this will be implemented? (I cannot see anything yet in the change log about it)
Hi, i am also interrested by this option and i cannot find it , does it exist already ?
Re: Numeric string input

Posted:
25 Nov 2015 17:31
by Alexander Bulei
Hi assapan,
Ups, implemented for next beta build

Best Regards.
Re: Numeric string input

Posted:
01 Dec 2015 17:21
by assapan
Hi Alexander , I've tried the newest version 2.8.0.164 .
The new parameter InitEmpty is ok for the initialization but if you clear the value by MyEdit.text=''; the edit shows '0' and hide the watermark .
Could we clear it completely ?
Re: Numeric string input

Posted:
13 Dec 2015 18:27
by assapan
Hi,
Tested in v2.8.0.171 the new property ZeroAsEmpty work as expected , many thanks.