codem/silverstripe-html5-inputs

Base HTML5 input fields, no Javascript

Installs: 5 435

Dependents: 4

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Type:silverstripe-vendormodule

v1.0.0 2024-05-10 07:06 UTC

This package is auto-updated.

Last update: 2024-10-10 08:09:22 UTC


README

This module provides a set of bare bones HTML5 inputs with no Javascript or CSS.

You can use these fields in your projects as-is or extend them to provide additional features or shims.

The supported inputs are listed at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input:

  • colour (color)
  • date, datetime-local, time
  • email (extends core Silverstripe EmailField)
  • month, week
  • number
  • range
  • search
  • tel
  • url

Browser support for these fields is varying although nearly all modern browsers will support these fields to a decent extent.

Date, datetime and time fields are particularly difficult to support, due to locale differences and even different user expectations within those locales.

Traits

Various field types support certain traits that allow setting/getting of common attributes

Datalist

Certain inputs support a <datalist>, e.g the colour field to restrict initial selection.

This works somewhat like a <select> element, except that browser implementation and support varies.

Requirements

  • silverstripe/framework ^5 (>= v1)
  • silverstripe/framework ^4 (< v1)

Installation

composer require codem/silverstripe-html5-inputs

License

BSD-3-Clause

See License

Documentation

Configuration

Hopefully none !

Maintainers

  • Codem

Bugtracker

Please use the Github issue tracker to report bugs and request features

Development and contribution

Pull requests and features are most welcome. If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.