Skip to content

[5.x] Fix appended form config fields when user locale differs from app locale #11704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

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
2 participants