Hello Magento Friends,

I am back with another Magento How-to solution. Today I will explain Magento 2: How to Add New Field in Admin User Create Form.

Customization is a fantastic feature provided by Magento. You can develop a fully custom-made store with Magento. Sometimes you need to save more information about admin users. To do that you need to create a custom field in the admin user create a form to save custom field information. Let’s learn How to Add New Field in Admin User Create Form in Magento 2.

Steps to Add New Field in Admin User Create Form in Magento 2:

Step 1: Firstly, create a “di.xml” file at the below path.

app\code\Vendor\Extension\adminhtml\etc\di.xml

Now add the code

Step 2: After that, we need to create a  “UserField.php” file at the below path

app\code\Vendor\Extension\Plugin\Block\Adminhtml\User\Edit\Tab\UserField.php

And add the below code

Here, we have added an image custom field. However, you can add your desired custom field by customizing the above code.

custom field

Conclusion:

Hopefully, all are able to Add New Field in Admin User Create Form in Magento 2. In case of any difficulty, let me know via the comment section. Share the article with your Magento friends and via social media. Stay in touch with us.

Happy Coding!

Click to rate this post!
[Total: 8 Average: 4]