Skip to content

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue with appended form config fields when the user's locale differs from the application's locale.

For example: if you append fields to the existing "Fields" section, and a user is viewing the Control Panel in German, your appended fields would show but the existing fields wouldn't.

\Statamic\Facades\Form::appendConfigFields('*', 'Fields', [
    'a' => ['type' => 'text', 'display' => 'First injected into fields section'],
    'b' => ['type' => 'text', 'display' => 'Second injected into fields section'],
]);

CleanShot 2025-04-15 at 12 43 19

This pull request fixes it by translating the section's display in the fields merging logic.

Fixes #11672.

@jasonvarga jasonvarga merged commit c3e8b7a into 5.x Apr 22, 2025
26 checks passed
@jasonvarga jasonvarga deleted the fix/appended-form-config-fields-with-translations branch April 22, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form custom configuration appended to existing sections disappears when user's selected locale is different than site's default locale
2 participants