Skip to content

Magento_CustomerCustomAttributes

Magento Modules:

  • Magento_CustomerCustomAttributes

Adobe Commerce Packages

  • magento/module-customer-custom-attributes

Repository

Note: this repo is only accessible with a Hyvä Enterprise license or as a contributor.

For more details, see: https://www.hyva.io/hyva-enterprise.html.

https://gitlab.hyva.io/hyva-enterprise/commerce/magento2-ee-magento-customer-custom-attributes

Features

All points are rated according to priority as P1 (critical), P2 (important), P3 (minor).

  • basic - does not break layout/design

Customer Account Create (/customer/account/create)

Customer Attributes

  • [P1] Custom attributes container area outputs within 'Personal Information' fieldset
  • [P1] Attributes only output if set to be shown in the storefront and included in create account form
  • [P2] Attributes output in correct sort order
Field Type Support (click to expand items checklist)
Text Field
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission
Text Area
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P1] Values saved on form submission
Multiline
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Correct number of lines output based on attribute config
  • [P1] Default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission

Luma bug: validation (required and additional) is supported for the first field only

Date
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Default value outputs (if set)
    • [P2] Displays today's date if not set
  • [P1] Date displays as per current locale settings (e.g. MM/DD/YYYY, DD/MM/YYYY etc.)

    Note: uses browser locale, not Magento

  • [P1] Required field validation works
  • [P2] Input/output filtering works (normalize date)
  • [P2] Additional field validation works
    • [P2] Date

      This is enforced by using HTML date type field

    • [P2] Minimum Date
    • [P2] Maximum Date
  • [P1] Values saved on form submission
Dropdown (Select)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
Multiple Select
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Default value outputs (if set)

    Note: Luma bug: fatal error occurs if no default/saved value set (fixed in Hyvä)

  • [P1] Required field validation works
  • [P1] Values saved on form submission
Yes/No
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
File (Attachment)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Allowed File Extensions
  • [P1] Values saved on form submission
Image File
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Maximum File Width
    • [P2] Maximum File Height
  • [P1] Values saved on form submission

Customer Address Attributes

Note: this fields only output if address output has been enabled in layout.xml on the registration block (there is no admin panel configuration control)

<referenceBlock name="customer_form_register">
    <arguments>
        <argument name="show_address_fields" xsi:type="boolean">true</argument>
    </arguments>
</referenceBlock>
  • [P3] Custom address attributes container area outputs within the 'Address Information' fieldset
  • [P3] Attributes only output if set to be shown in the storefront and included in customer address registration form
  • [P3] Attributes output in correct sort order
Field Type Support (click to expand items checklist)
Text Field
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Default value outputs (if set)
  • [P3] Required field validation works
  • [P3] Input/output filtering works (escape/strip tags)
  • [P3] Additional field validation works
    • [P3] Alphanumeric
    • [P3] Alphanumeric with spaces
    • [P3] Numeric Only
    • [P3] Alpha Only
    • [P3] URL
    • [P3] Email
    • [P3] Length Only
  • [P3] Values saved on form submission
Text Area
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Default value outputs (if set)
  • [P3] Required field validation works
  • [P3] Input/output filtering works (escape/strip tags)
  • [P3] Values saved on form submission
Multiline
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Correct number of lines output based on attribute config
  • [P3] Default value outputs (if set)
  • [P3] Required field validation works
  • [P3] Input/output filtering works (escape/strip tags)
  • [P3] Additional field validation works
    • [P3] Alphanumeric
    • [P3] Alphanumeric with spaces
    • [P3] Numeric Only
    • [P3] Alpha Only
    • [P3] URL
    • [P3] Email
    • [P3] Length Only
  • [P3] Values saved on form submission

Luma bug: validation (required and additional) is supported for the first field only

Date
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Default value outputs (if set)
    • [P3] Displays today's date if not set
  • [P3] Date displays as per current locale settings (e.g. MM/DD/YYYY, DD/MM/YYYY etc.)

    Note: uses browser locale, not Magento

  • [P3] Required field validation works
  • [P3] Input/output filtering works (normalize date)
  • [P3] Additional field validation works
    • [P3] Date

      This is enforced by using HTML date type field

    • [P3] Minimum Date
    • [P3] Maximum Date
  • [P3] Values saved on form submission
Dropdown (Select)
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Options output with correct labels (for current storefront)
  • [P3] Options output in correct order (as per admin)
  • [P3] Default value outputs (if set)
  • [P3] Required field validation works
  • [P3] Values saved on form submission
Multiple Select
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Options output with correct labels (for current storefront)
  • [P3] Options output in correct order (as per admin)
  • [P3] Default value outputs (if set)

    Note: Luma bug: fatal error occurs if no default/saved value set

  • [P3] Required field validation works
  • [P3] Values saved on form submission
Yes/No
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Default value outputs (if set)
  • [P3] Required field validation works
  • [P3] Values saved on form submission
File (Attachment)
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Required field validation works
  • [P3] Additional field validation works
    • [P3] Maximum File Size
    • [P3] Allowed File Extensions
  • [P3] Values saved on form submission
    • Luma bug: values do not save on form submission
Image File
  • [P3] Attribute input field displays
  • [P3] Title outputs with correct label (for current storefront)
  • [P3] Required field validation works
  • [P3] Additional field validation works
    • [P3] Maximum File Size
    • [P3] Maximum File Width
    • [P3] Maximum File Height
  • [P3] Values saved on form submission
    • Luma bug: values do not save on form submission

Customer Account Information (/customer/account/edit)

  • [P1] Custom attributes container area outputs below main account information
  • [P1] Attributes only output if set to be shown in the storefront and included in account edit form
  • [P2] Attributes output in correct sort order
Field Type Support (click to expand items checklist)
Text Field
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission
Text Area
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P1] Values saved on form submission
Multiline
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Correct number of lines output based on attribute config
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission

Luma bug: validation (required and additional) is supported for the first field only

Date
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
    • [P2] Displays today's date if not set
  • [P1] Date displays as per current locale settings (e.g. MM/DD/YYYY, DD/MM/YYYY etc.)

    Note: uses browser locale, not Magento

  • [P1] Required field validation works
  • [P2] Input/output filtering works (normalize date)
  • [P2] Additional field validation works
    • [P2] Date

      This is enforced by using HTML date type field

    • [P2] Minimum Date
    • [P2] Maximum Date
  • [P1] Values saved on form submission
Dropdown (Select)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
Multiple Select
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Saved/default value outputs (if set)

    Note: Luma bug: fatal error occurs if no default/saved value set (fixed in Hyvä)

  • [P1] Required field validation works
  • [P1] Values saved on form submission
Yes/No
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
File (Attachment)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved value outputs (if set)
  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Allowed File Extensions
  • [P1] Values saved on form submission
Image File
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved value outputs (if set)

    Note: this is not supported in Luma

  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Maximum File Width
    • [P2] Maximum File Height
  • [P1] Values saved on form submission

Customer Address Book Add/Edit (/customer/address/new / /customer/address/edit/id/{id}/)

  • [P1] Custom attributes container area outputs below main address fields
  • [P1] Attributes only output if set to be shown in the storefront and included in address add/edit form
  • [P2] Attributes output in correct sort order
Field Type Support (click to expand items checklist)
Text Field
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission
Text Area
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P1] Values saved on form submission
Multiline
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Correct number of lines output based on attribute config
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P2] Input/output filtering works (escape/strip tags)
  • [P2] Additional field validation works
    • [P2] Alphanumeric
    • [P2] Alphanumeric with spaces
    • [P2] Numeric Only
    • [P2] Alpha Only
    • [P2] URL
    • [P2] Email
    • [P2] Length Only
  • [P1] Values saved on form submission

Luma bug: validation (required and additional) is supported for the first field only

Date
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
    • [P2] Displays today's date if not set
  • [P1] Date displays as per current locale settings (e.g. MM/DD/YYYY, DD/MM/YYYY etc.)

    Note: uses browser locale, not Magento

  • [P1] Required field validation works
  • [P2] Input/output filtering works (normalize date)
  • [P2] Additional field validation works
    • [P2] Date

      This is enforced by using HTML date type field

    • [P2] Minimum Date
    • [P2] Maximum Date
  • [P1] Values saved on form submission
Dropdown (Select)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
Multiple Select
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Options output with correct labels (for current storefront)
  • [P1] Options output in correct order (as per admin)
  • [P1] Saved/default value outputs (if set)

    Note: Luma bug: fatal error occurs if no default/saved value set

  • [P1] Required field validation works
  • [P1] Values saved on form submission
Yes/No
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P1] Saved/default value outputs (if set)
  • [P1] Required field validation works
  • [P1] Values saved on form submission
File (Attachment)
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P3] Saved value outputs (if set)

    Blocked by Luma bug - currently only outputs file name (cannot download existing file)

    Need to reimplement \Magento\CustomerCustomAttributes\Controller\Address\File\Viewfile as does not consider that multiple address entries exist and takes file value from last address found while looping through

  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Allowed File Extensions
  • [P1] Values saved on form submission
Image File
  • [P1] Attribute input field displays
  • [P1] Title outputs with correct label (for current storefront)
  • [P3] Saved value outputs (if set)

    Blocked by Luma bug - currently only outputs file name (cannot view/download existing image)

    Need to reimplement \Magento\CustomerCustomAttributes\Controller\Address\File\Viewfile as does not consider that multiple address entries exist and takes file value from last address found while looping through

    Note: this is not supported in Luma

  • [P1] Required field validation works
  • [P2] Additional field validation works
    • [P2] Maximum File Size
    • [P2] Maximum File Width
    • [P2] Maximum File Height
  • [P1] Values saved on form submission

Contributors

Voting

Use 👍 to cast your vote.

Edited by John Hughes
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information