Skip to content

Mapped field to locale results in label and code swapped #12851

@RCheesley

Description

@RCheesley

Mautic Version

4.4.x series

PHP version

8

What browsers are you seeing the problem on?

No response

What happened?

This has been a bug since version 4 and maybe before then.

If you create a form and then you add a field for preferred locale, and connect it up to the contact field of the same name, when the form is rendered in the front end you see the language code rather than the name of the language.

You can see this in action at mautic.org/download!

Guessing it's one of those label/key reversals that were missed in the past!

How can we reproduce this issue?

Step 1: create form
Step 2: add a field with the select type, call it preferred language
Step 3: connect the field up to the preferred locale field and allow the contact field list items to be used

When you preview the form you will notice that instead of seeing the use of friendly language you see the language code.

Relevant log output

No response

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    T1Low difficulty to fix (issue) or test (PR)bugIssues or PR's relating to bugscontactsAnything related to contactsformsAnything related to formsstaleIssues which have not received an update within 90 days

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions