Multiple Choice and Checkboxes no longer offer "Inline", but the default views still use it
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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')]);
- Vorherrschende Sprache
- PHP
- Sterne
- 4.9k
- Forks
- 647
- Ø Merge
- 1 T. 45 Min.
- Gemergte PRs (30 T.)
- 221
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus statamic/cms
-
forms ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
antlers
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Nav: link to the site root with an anchor (/#section) gets is_parent on every pageEvtl. vergeben @duncanmcclean hat das heute übernommen. Offennavigations
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
Confusing UX when switching between formsEvtl. vergeben @jaygeorge hat das vor 1 Tag übernommen. Offenforms ux
statamic/cms#16047 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
sync-en
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag
-
Selection on a line without a docblock tag drops trailing characters (data provider attribute)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
vimeo/psalm#15150 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
taskforcesh/bullmq#5238 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] v-change-database-password reports success but doesn't change the password when MySQL validate_password rejects itEvtl. vergeben @bfs2021 hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Automattic/jetpack#55517 ·
Maintainer antworten meist innerhalb von 1 Tag