Coder Social home page Coder Social logo

Comments (7)

alxndrsn avatar alxndrsn commented on July 26, 2024 2

Sorry, of course there are those types! I was momentarily confused by number.

from enketo-xslt.

alxndrsn avatar alxndrsn commented on July 26, 2024

What's wrong with <input type="number">? I can't remember trying it, so perhaps it just doesn't work...

from enketo-xslt.

MartijnR avatar MartijnR commented on July 26, 2024

This appearance is to show the number keyboard on mobile devices (tested on Chrome on Android) to make it easier to enter phone numbers. I always thought this was impossible! 🎉

from enketo-xslt.

alxndrsn avatar alxndrsn commented on July 26, 2024

@MartijnR You can also use <input type="number"/> instead of type="tel". This may be more suitable:

Android 6/Chrome 59:

  • tel: numeric keypad but with letters below each number (e.g. 2 ABC), and a drop-down of phone numbers; *, # and + are all available; no , or .
  • number: numeric keypad without letters, and with , and . available

iOS 10

  • tel: numeric keypad with letters below each number, and +, *, '#`
  • number: keyboard switched to 123 layout, so numbers, punctuation and currency symbols are available

I haven't tested with older versions of Android, but support may differ.

from enketo-xslt.

MartijnR avatar MartijnR commented on July 26, 2024

Ah thanks. I see "-" is also available for type="number". I didn't know that.

Having the letters on the numeric keypad and the ability to use "+", "()" makes type="tel" more attractive, I think, knowing that appearance="number" is meant for phone numbers.

from enketo-xslt.

alxndrsn avatar alxndrsn commented on July 26, 2024

I was worried that this wasn't a good fit as without , and . you can't input decimals. But I didn't realise that:

appearance="number" is meant for phone numbers

That seems unfortunate, to me! Is there an appearance for actual numbers?

from enketo-xslt.

MartijnR avatar MartijnR commented on July 26, 2024

Is there an appearance for actual numbers?

You mean in addition to type="int" and type="decimal" (in XForm)? No there isn't. What kind of use case?

from enketo-xslt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.