CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Numeric string input

by magosk » 28 Feb 2014 14:58

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.
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Alexander Bulei » 03 Mar 2014 10:46

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Alexander Bulei » 05 Mar 2014 19:27

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by magosk » 14 Mar 2014 15:06

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?
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by magosk » 14 Mar 2014 15:09

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?
magosk
 
Posts: 181
Joined: 07 Oct 2013 08:41

by Jorge Sousa » 14 Mar 2014 16:35

Hello

create a css file and load it useing ServerController.StyleSheet, IWForm.Stylesheet or IWForm.ContentFiles or event IWForm.PageContext.AddLink
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by assapan » 25 Nov 2015 16:45

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 ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 25 Nov 2015 17:31

Hi assapan,

Ups, implemented for next beta build :D

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 01 Dec 2015 17:21

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 ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by assapan » 13 Dec 2015 18:27

Hi,
Tested in v2.8.0.171 the new property ZeroAsEmpty work as expected , many thanks.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

Next

Return to JQMEdit

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.