The hidden fieldtype (label and value) are always visible in submission email

Aperta
#10,305 3 commenti 3 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #10311 di @duncanmcclean — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
laravel, php
Ambito
backend

Direzione di ricerca

Start by reading the form submission email handling and reproducing the reported behavior with a field configured as type: hidden. Check whether the email includes the hidden field's label and value, and compare behavior for the other hidden-field settings listed in the issue. Done means hidden fields are omitted from the default submission email; the issue does not name files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

forms
Bug description

Currently every field (label and value) lands in the default form submission email.

Doesn't matter if it's:

  • type: hidden
  • input_type: hidden
  • listable: hidden
  • visibility: hidden
  • hide_display: false

We're using a field with type: hidden for doing some turnstile spam protection, but the client receives then something like:
Cloudflare Turnstile Response: 0.PiYCjjqiZhCSotPBhhQcQbcoEyRH0tOmLbHT4zguCx2DkeAsnbJHKi7H42P_Z8-5jG62mZdWj-rF1wa7hnvGnRJbHcwODlZglX4nNhINbUb0yBfej31vW6sqpYFZRxN2Tnfw8SivPPYyJLuedcIAreJvScjztpwCJix0tdeYA2L_4euXx06HUzepy2fg95QfAofSe8qfLXDYgw1lMDbpT6PR8brVGkuvk7mdV6see2NmMdSxqvtUJgaEQ0k6a6i3SU8fLww_hY26QOCbhxTlcQ93yfWgiJxOGzKl9kQQLZHT0w7jsvmCU6xfUOQVUWAbjSaNifNxNq3GlFK0KzCC3hoO5m5FBxm7FVOcE7g_i0DUOb7tWNRaRBs1Yg37FnvECJDa-ILBSAycS9Z4HUV_C823JOeNetWXFV7Ii9BVs4fJmMEqf3F9h29lHMLX0MJR.Rlp-nIqvtHyIln4-vVToXg.4ef4a0fa7a4bd5d31dd758b82a4b697e5cb16d8e933af3affbc4fe42a1ea4c4e

I'm not even able to unset the field value in a listener and prevent the appearing, the clients still receives the label.

Also not adding it to the blueprint is not possible, because fields not existing in blueprints are ignored. (apart from the ones added by statamic, e.g. _token)

How to reproduce
  1. Create a form
  2. Add a field with type: hidden
  3. Fill out form and submit it
  4. Have a look on the form submission email
Logs

No response

Environment
Environment
Application Name: Statamic
Laravel Version: 11.10.0
PHP Version: 8.2.14
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: statamic-fieldtype-hidden.test
Maintenance Mode: OFF

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

Drivers
Broadcasting: log
Cache: statamic
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.7.3 Solo
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Lingua principale
PHP
Stelle
4.9k
Fork
647
Merge medio
1g 45m
PR unite (30g)
221

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di statamic/cms

Tutte le issue di statamic/cms

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.