Hello I added an custom customer attribute "kndnumber" to my register page. Attribute is successfully created in DB. My Problem is when I submit the user register request the error Messsage "Kundennummer" is a required field. shows up even if the value is in the request body. I Implemented the frontend as following

  1. Created custom Module
  2. Added CustomModule/view/frontend/templates/additional.phtml
  3. Added CustomModule/view/frontend/layout/customer_account_create.xml


<div class="field kndnumber required">
    <label class="label" for="kndnumber">
        <span><?= $block->escapeHtml(__('Kundennummer')) ?></span>
    <div class="control">
        <input type="text" name="kndnumber" id="kndnumber" value="" title="<?= $block->escapeHtmlAttr(__('Kundennummer')) ?>" class="input-text" data-validate="{required:true}">


<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="form.additional.info">
            <block class="Magento\Framework\View\Element\Template" name="form_additional_info_customer" template="Magento_CustomerAttribute::additional.phtml"/>


But I´m getting the error displayed in the picture. The Backend says the field is required which is true because I want it that way. But I have the kndnumber in my request why does the backend say it´s not I dont get it.

Does anyone have a clue what the problem is?

This is the attribute in the table 'customer_eav_attribute' test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.