Multiple Choice and Checkboxes no longer offer "Inline", but the default views still use it
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Start with the field configuration for Multiple Choice and Checkboxes, then compare it with the default views extend/forms/antlers/fields/multi_choice.antlers.html, checkboxes.antlers.html, and yes_no.antlers.html. Decide whether to restore the Inline option in the builder or remove its use from the views and document the change. A pull request is already open for this issue, so check its status before starting.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug description
In Forms 1, the Radio and Checkboxes fields in a form had an Inline toggle. In Forms 2, the form builder offers only Options for Multiple Choice and Checkboxes, so the setting can no longer be seen or changed.
The setting still has an effect, though:
- MultiChoice::toFieldArray() passes any extra config through, so inline: true in a form's YAML still reaches the template.
- The default views still check it with
{{ unless inline }}<br>{{ /unless }}:extend/forms/antlers/fields/multi_choice.antlers.html,checkboxes.antlers.htmlandyes_no.antlers.html. Yes / No never offered the option at all.
As a result:
- Fields converted from Forms 1 with Inline turned on keep rendering inline, but editors can't see why or turn it off.
- A new field can't be made inline without editing the YAML by hand.
I couldn't find this mentioned in the Forms 2 PR (#15039) or the upgrade notes, so it looks unintended.
Expected: either the form builder offers Inline for Multiple Choice and Checkboxes (and Yes / No), or the default views stop checking inline and the upgrade notes mention the removal.
How to reproduce
- Add a Multiple Choice field with
inline: trueto a form's YAML. A Forms 1 form with an inline Radio field, re-saved on 6.44, ends up the same way.
-
handle: delivery
field:
type: multi_choice
display: Delivery
inline: true
options:
-
key: fast
value: Fast
-
key: slow
value: Slow
- Open the field in the form builder. There's no Inline option, but the YAML still has
inline: true. - Render the form with the default field views. The options render inline (no
<br>between them). - Add a new Multiple Choice field. There's no way to make it inline.
Logs
Environment
Statamic 6.44.0 Pro
Laravel 12.69.3
PHP 8.4.28
Installation
Fresh statamic/statamic site via CLI
Additional details
As a workaround, the option can be added back from a service provider:
use Statamic\Forms\Fieldtypes\Checkboxes;
use Statamic\Forms\Fieldtypes\MultiChoice;
MultiChoice::appendConfigField('inline', ['type' => 'toggle', 'display' => __('Inline')]);
Checkboxes::appendConfigField('inline', ['type' => 'toggle', 'display' => __('Inline')]);
- Langage dominant
- PHP
- Étoiles
- 4.9k
- Forks
- 647
- Merge moyen
- 1 j 45 min
- PR mergées (30 j)
- 221
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de statamic/cms
-
forms ui
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
accessibility
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
antlers
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
Nav: link to the site root with an anchor (/#section) gets is_parent on every pagePeut-être pris @duncanmcclean l’a pris aujourd’hui. Ouvertenavigations
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 1 jour
-
Confusing UX when switching between formsPeut-être pris @jaygeorge l’a pris il y a 1 jour. Ouverteforms ux
statamic/cms#16047 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de statamic/cms
Issues similaires
-
sync-en
Difficulté 1/5 Moins d'une heure Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Selection on a line without a docblock tag drops trailing characters (data provider attribute)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
vimeo/psalm#15150 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
taskforcesh/bullmq#5238 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itPeut-être pris @bfs2021 l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Automattic/jetpack#55517 ·
Les mainteneurs répondent en général sous 1 jour