Skip to content

What does size attribute of number field type do? #440

Answered by AugustMiller
acalvino4 asked this question in Ideas
Discussion options

You must be logged in to vote

Sorry for any confusion. This may just be a legacy feature that has persisted, but I think it makes some sense… here's a few tidbits that may clarify what's going on:

Generalizations About Inputs

  • Many inputs in the control panel are allowed to be the full width of their parent.
  • Number inputs, however, don't often need very many characters—their values will probably share a general "magnitude" or number of significant places (either as large values, or values with a specific number of decimal places).

Input Type

The "Number" field is still rendered as an <input type="text"> element, in the Craft control panel:

<input
  type="text"
  id="fields-rating"
  class="text"
  name="fields[rating…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AugustMiller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants