Skip to Main Content
Feature Request FR-2132
Product Area Page Components
Status DELIVERED

26 Voters

Allow Item/Column (Type: Number Field) to allow only number/decimal input

akilr20 Public
· Oct 30 2021

Idea Summary
A page item/ Editable Interactive Grid Column (Type: Number Field) must have an option to allow only number/decimal input.

Use Case
Customer to Developer

  • I want a page item/ Editable Interactive Grid Column where the end-user is only allowed to type number/decimal values.

Preferred Solution (Optional)

  • By default the number item must allow input of decimal values with one dot.
  • Create a switch (Allow only Number) in the attributes section of the item/column. 

I have created a blog post for this usecase

https://akilramesh.blogspot.com/2021/10/allow-only-numbersdecimal-in-numbertext.html

This has been delivered in Oracle APEX 22.2!

Comments

Comments

  • andreblu OP 3.9 years ago

    Also should refresh as you type accordingly to format mask

  • john.snyders APEX Team OP 3.8 years ago

    The number field supports format masks and you need to enter any characters allowed by the format so for example “,", “$” euro symbol etc.

  • jayson hanes Admin OP 3.8 years ago

    @john, I think the goal here would be to use client-side JS to prevent invalid data entry at all - before validation. I can set a format mask to FML999G999G999G999G990D00 on a number field and I can still type in letters and other nonsense.

  • fac586 OP 3.8 years ago

    It would eliminate a lot of confusion if the features and behaviour for items of Type: Number aligned with the input type="number"  element defined in the HTML specification.

    APEX should basically provide direct implementations of all the HTML input states grouped under Basic item types, plus Enhanced items such as Shuttles, Checkbox Group, Popup LOV, Numeric (with format masks etc), plus slots for Plug-Ins and Legacy items.

  • nicolas pilot OP 3.3 years ago

    YES YES YES !!!!

    We are loosing a lot of time on pages with currency input to make sure that users only input number.

    It would be awesome to have an option on “Number Field” to allow only number characters + comma + dot and when getting this value using :MY_NUMBER or apex.items.MY_NUMBER.value we should get the number value (without the comma). Small idea but a big big plus when dealing with currency input.

    Something similar to this would be fantastic : https://codepen.io/559wade/pen/LRzEjj

  • karel ekema OP 1.9 years ago

    Indeed the release notes on 22.2 refer to this idea, describing the new ‘Virtual Keyboard’ attribute:

    ‘A new attribute, Virtual Keyboard, is now available on the Number page item. You can use this attribute to configure the type of virtual keyboard to use on mobile devices when editing a Number page item’

    I guess this is a partial solution, for mobile devices - for regular desktop browser apps, the issue still exists.