Skip to content

Use number field type for number fields #256

@laryn

Description

@laryn

It looks like this was in place at one point and removed until browser support warranted it:

  • // This IF statement is mostly in place to allow our tests to set type="text"
    // because SimpleTest does not support type="number".
    if (!isset($element['#attributes']['type'])) {
    // HTML5 number fields are no long used pending better browser support.
    // See issues #2290029, #2202905.
    // @code
    // $element['#attributes']['type'] = 'number';
    // @endcode
    $element['#attributes']['type'] = 'text';
    }

I'm not sure if it's as simple as uncommenting the line above.

Earlier related Drupal issue that led to reverting to text field:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions