I have successfully added new field for the registration form.

But the problem I'm facing right now is where does the data save? In which table in database?

I tried looking in the customer_entity but the data is not saved there. Any idea?

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here And here's my code for the front end.


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

1 Answer 1


As the type of your attribute is varchar you will find it in customer_entity_varchar.

As the attribute_id is 160 in your case:

SELECT * FROM customer_entity_varchar WHERE `attribute_id` = 160
  • Thanks found it. Sorry just new to this magento 2. But how can I do it if I want the value to add in the customer_entity table? Is there any way to manipulate the code so that the value will be added in the customer_entity table?
    – Daniel_C
    Feb 10, 2020 at 20:31
  • This needs more coding. See magento.stackexchange.com/questions/266635/… for a up to date approach.
    – CloudySi
    Feb 10, 2020 at 20:49
  • I see. Okay. Thanks
    – Daniel_C
    Feb 10, 2020 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.