#38090·magento2

CSS class missing from city field element in account-create form

Author: JerrySmidtCreated Oct 17, 2023Updated Sep 28, 2026
LabelsIssue: ConfirmedTriage: Dev.ExperienceReproduced on 2.4.xProgress: ready for devPriority: P2Reported on 2.4.xComponent: FrontendArea: UI Framework

Preconditions and environment

  • Magento version 2.4
  • Address fields enabled in the register form:

Add to <body> in view/frontend/layout/customer_account_create.xml:

xml
<referenceBlock name="customer_form_register">
    <arguments>
        <argument name="show_address_fields" xsi:type="boolean">true</argument>
    </arguments>
</referenceBlock>

Steps to reproduce

  1. Navigate to the register form (customer/account/create/).
  2. Inspect element div.field that contains the city input.
  3. Note that it is missing the city classname.

Expected result

The div.field element containing the city input having a city class. Similar to the other field elements that have classes relating to their inputs.

Actual result

The div.field element containing the city input is missing a city class.

Additional information

To fix, add the class to the city field in here: https://github.com/magento/magento2/blob/2b3ad2eeb6903643b678ceeb7d1ea7361035dee7/app/code/Magento/Customer/view/frontend/templates/form/register.phtml#L187

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.