Inconsistent Select fieldtype form submission handling
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #12840 de @mmodler — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Reproduce this with the provided YAML blueprint: create a form containing select options with numeric keys and string keys, submit it, and inspect the submission. Start by tracing how select field values are displayed when viewing submissions; the payload names no source files or tests. Done means both kinds of keys display the option label consistently, while submissions still retain the values needed by integrations.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
Depending on whether the option keys are strings of characters or numbers, the select fieldtype will show different behaviour when viewing form submissions. If the key is a number, it will show the key. If it is a string of characters, it will show the label.
Is there any way to control which one to display? The number example is taken from a form that is used on one of our sites and is used to post to a CRM - those keys are some of its IDs so we can't actually change these.
How to reproduce
Create a form with the following blueprint:
tabs:
main:
display: Main
sections:
-
fields:
-
handle: test_number_keys
field:
options:
-
key: 926450000
value: 'test 1-9'
-
key: 926450001
value: 'test 10-49'
-
key: 926450002
value: 'test 50-249'
-
key: 926450003
value: 'test 250-999'
-
key: 926450004
value: 'test 1000-4999'
-
key: 926450005
value: 'test 5000+'
type: select
display: 'Test number keys'
-
handle: test_string_keys
field:
options:
-
key: Eggs
value: 'Eggs label'
-
key: Beans
value: 'Beans label'
-
key: Bacon
value: 'Bacon label'
type: select
display: 'Test string keys'
Load the form in a page with the form tag, submit it, check the submission.
Logs
Environment
Environment
Application Name: Statamic
Laravel Version: 12.32.5
PHP Version: 8.3.22
Composer Version: 2.8.9
Environment: local-db
Debug Mode: ENABLED
URL: localhost
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
Storage
public/storage: NOT LINKED
Statamic
Addons: 7
Sites: 1
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 5.65.2 PRO
Statamic Addons
anakadote/statamic-recaptcha: 2.0
eminos/statamic-tabs: 1.2.0
jezzdk/statamic-google-maps: 2.1.0
patrickjunod/image-select: 1.0.0
rias/statamic-redirect: 3.12.0
statamic/eloquent-driver: 4.32.0
withcandour/aardvark-seo: 5.0.5
Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Fieldsets: file
Form Submissions: file
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: eloquent
Tokens: file
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- Lenguaje dominante
- PHP
- Estrellas
- 4.9k
- Forks
- 647
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 100
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de statamic/cms
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
assets
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Make native filesystem directory permissions configurable to support shared POSIX ACL accessAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
accessibility
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
antlers
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
Todos los issues de statamic/cms
Issues similares
-
No Code Attached Yet
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
joomla/joomla-cms#48611 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Automattic/safe-publish#716 ·
Los mantenedores suelen responder en 1 día
-
FrameworkBundle SecurityBundle
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
symfony/symfony-docs#23277 ·
Los mantenedores suelen responder en 3 días
-
[Sync EN] hard link does not need special permissionsPosiblemente ocupada @lacatoire la tomó hoy. Abiertosync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día