04-05-2013 05:44 AM
is there a easy way to suggest a capital letter while textinput? I have seen this in native android apps and love it. It's very usefull to input names, locations, ...
04-05-2013 05:51 AM
04-25-2013 12:42 AM
This forces every word to start with an uppercase and the user can't change it. Is there a way to replicate the native functionality where the keyboard is in captial mode for the first letter only and by pushing shift the user can change it to lower case?
04-25-2013 02:07 AM
I am also interested, because I found a problem with this solution. The first letter is capital displayed but isn't saved like that (it's logical because only CSS redesigns it, I didn't see it). In addition the CSS solution does not work on some android devices.
Any other ideas?
04-25-2013 05:07 PM - edited 04-25-2013 05:08 PM
In addition to using CSS for the display of the text, you can use the toUpperCase() method prior to saving the data.
eg: var text2 = text1.charAt(0).toUpperCase() + text1.slice(1);
04-25-2013 06:06 PM
04-26-2013 04:42 PM
I don't think a plugin/extension is the right way to go here - unless you mean as a reusable component that could be dropped into web projects and attached to text fields. We don't need native code to do this, but something for HTML5 would be good.
What about attaching an oninput function to the text field, and capitalizing the first letter for the user. If the letter has already been changed to be capitalized once, then don't change it - so you cover the use case of deleting the capitalized letter and replacing it with a small one? Make it cut out if there's more than one character in it?
04-26-2013 04:47 PM - edited 04-26-2013 04:48 PM
I think Tim is right, the right approach is to visually do the changes and not to do it before saving as the user may not be pleased with the result.
There are some corner cases which may annoy users as well. For acronyms per example. If I type CP 1234 for the address and you keep changing it to Cp 1234, that might annoy me.