facebook

Input field type Number

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #332442 Reply

    Max87
    Member

    Hello 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

    #332464 Reply

    Hi 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”);

    #333185 Reply

    mreade
    Member

    Support,

    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

    #333265 Reply

    support-michael
    Keymaster

    >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.png

    Attachments:
    You must be logged in to view attached files.
    #333267 Reply

    Max87
    Member

    Hi 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

    #333268 Reply

    mreade
    Member

    Support (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

    #333271 Reply

    support-michael
    Keymaster

    @Max87

    >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>

    #333337 Reply

    Paul G
    Member

    Hello,

    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

    #333341 Reply

    support-michael
    Keymaster

    Hi 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?

    #333347 Reply

    Paul G
    Member

    Hello 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

    #333355 Reply

    Max87
    Member

    Paul: 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.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Input field type Number

You must be logged in to post in the forum log in