- This topic has 10 replies, 5 voices, and was last updated 11 years, 11 months ago by Max87.
-
AuthorPosts
-
Max87MemberHello guys,
in my project I use input fields with type set to Number.I can input integer numbers(0-9), but I can’t input float(0.5, 1.5 etc)
Is there any solution how to input float numbers(except I set type to Text and full keyboard pops-up).
Thanks for help
support-octavioMemberHi Max,
We have an improvement coming out in next release. It will change the implementation to use the HTML5 typed input field:
<input type=”number” …>
You can modify the type attribute at runtime in javascript as a short term workaround. I suggest you to use something like this:
document.getElementById(“m1-Name-textField1”).setAttribute(“type”,”Number”);
mreadeMemberSupport,
I am interested in the post as well. I am in the process of creating an App which performs a lot of calculations. Because the number keypad does not have a decimal, I’ve set the input fields to text, then convert the text to a number using Number().
Of course, the text keypad pops up when users attempt to input field data. I too am interested to know how to show the keypad with a decimal so users can enter numbers directly without having to switch the keypad from text to number format.
Do you have any timeline on when this update/feature might be expected?
Thanks
Mike
support-michaelKeymaster>Of course, the text keypad pops up when users attempt to input field data. I too am interested to know how to show the keypad with a decimal so users can enter numbers directly without having to switch the keypad from text to number format.
We recently released MobiOne 2.3M1 preview which includes setting a “number” type on an InputField widget. This setting uses the iOS and android default keyboards for numbers. Following are screenshot of this feature and how the keyboards appear on iOS and android devices. Notice that the iOS number keyboard is not a 0-9 number pad. For such an input use the telephone type.
See attachment inputfield-number.png
See attachment keyboard1.pngAttachments:
You must be logged in to view attached files.
Max87MemberHi Wayne, thanks for the post.
What I need is number keypad(telephone type, only numbers 0-9) but with comma character(as seen in the android picture) for iOS.
Is there a chance to achieve this?
When I try to set edit box type to number in current version, 0-9 pad comes out, but without comma character(so I’m unable to input float numbers)
Thanks
mreadeMemberSupport (Wayne),
Excellent! This is great news.
Where I recently purchased the MobiOne software about 1 month ago, will I be able to upgrade to this new version when it becomes available?
Many thanks,
Mike
support-michaelKeymaster>When I try to set edit box type to number in current version, 0-9 pad comes out, but without comma character(so I’m unable to input float numbers)
Clear! We have investigated this and were unable to customize the keyboard using techniques such as <input pattern=<regex>
Paul GMemberHello,
This code will allow you to enter decimals
<input id=”m1-Intcal1-textFieldDebt” class=”m1-textfield m1-textfield-border m1-font-9″
value=”” type=”number” pattern=”\d+(\.\d*)?” name=”textFieldDebt”/>Paul
support-michaelKeymasterHi Paul,
I tried your proposed pattern=”\d+(\.\d*)?” on iphone5/ios6 and nexus S/android 4.0 and did not observe any diff in the keyboard screenshots I posted below. Am I missing something?
Paul GMemberHello Wayne,
Yes it is exactly the same as in your iphone photo.
Digits with decimal point.
I thought that was what this thread was trying to achieve.
Did I miss something?
Paul
Max87MemberPaul: the goal is to achieve android number keyboard(only 0-9 pad) on iphone with decimal point.
When you set edit box to type number now, 0-9 pad comes out, but without decimal character. -
AuthorPosts