statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.12k stars 540 forks source link

Form Integer field is not rendered with the right type #11063

Closed AtmoFX closed 3 weeks ago

AtmoFX commented 3 weeks ago

Bug description

In forms, Integer fields are rendered as <input type="text"> and allow text to be input (although ultimately, submitting the form will trigger an error XXX field must be an integer). It does not make much sense since Text fields with Input type = number are rendered as <input type="number">.

How to reproduce

Simply create a form with a text field, setting its input type to number and an integer field and open the form in the front end.

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 11.30.0
PHP Version: 8.3.13
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: gaia-hub.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: log
Queue: sync
Session: file

Statamic
Addons: 3
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.36.0 PRO

Statamic Addons
alt-design/alt-seo: 1.2.1
jacksleight/statamic-bard-mutator: 3.0.3
statamic/eloquent-driver: 4.16.1

Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file

Installation

Fresh statamic/statamic site via CLI

Additional details

No response