How to add custom customer attribute in custom tab in customer edit page of admin in magento2magento 2.1 grid on custom tab of admin product edit pageHow to add custom customer attribute in customer edit account pageCustom attribute - Product pageMagento 2: How to edit existing product tabMagento 2 Add Group Title and its own Tabs in Customer Admin edit viewHow to send data from custom fields to a function in admin customer editHow to show custom attributes of customer in separate/new tabMagento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account

How can an organ that provides biological immortality be unable to regenerate?

When should a starting writer get his own webpage?

Should I be concerned about student access to a test bank?

How to remove space in section title at KOMA-Script

Does convergence of polynomials imply that of its coefficients?

Why doesn't the fusion process of the sun speed up?

Does fire aspect on a sword, destroy mob drops?

Asserting that Atheism and Theism are both faith based positions

Why is indicated airspeed rather than ground speed used during the takeoff roll?

Would storms on an ocean world harm the marine life?

Single word to change groups

Help with identifying unique aircraft over NE Pennsylvania

Jem'Hadar, something strange about their life expectancy

Would it be believable to defy demographics in a story?

When did hardware antialiasing start being available?

How can a new country break out from a developed country without war?

Exit shell with shortcut (not typing exit) that closes session properly

pipe commands inside find -exec?

Can "few" be used as a subject? If so, what is the rule?

How do researchers send unsolicited emails asking for feedback on their works?

If I cast enlarge/reduce on an arrow, what weapon could it count as?

How to read string as hex number in bash?

What is the reasoning behind standardization (dividing by standard deviation)?

How can I query the supported timezones in Apex?



How to add custom customer attribute in custom tab in customer edit page of admin in magento2


magento 2.1 grid on custom tab of admin product edit pageHow to add custom customer attribute in customer edit account pageCustom attribute - Product pageMagento 2: How to edit existing product tabMagento 2 Add Group Title and its own Tabs in Customer Admin edit viewHow to send data from custom fields to a function in admin customer editHow to show custom attributes of customer in separate/new tabMagento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account













5















I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.



I want to show them in my custom tab.










share|improve this question
















bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • found the solution for this?

    – CompactCode
    Mar 29 '18 at 2:52











  • Any body know solution ?

    – amit_game
    Jul 31 '18 at 5:55











  • I need a solution, too.

    – skymeissner
    Sep 28 '18 at 13:07











  • the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

    – David Verholen
    Jan 11 at 21:12
















5















I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.



I want to show them in my custom tab.










share|improve this question
















bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • found the solution for this?

    – CompactCode
    Mar 29 '18 at 2:52











  • Any body know solution ?

    – amit_game
    Jul 31 '18 at 5:55











  • I need a solution, too.

    – skymeissner
    Sep 28 '18 at 13:07











  • the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

    – David Verholen
    Jan 11 at 21:12














5












5








5








I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.



I want to show them in my custom tab.










share|improve this question
















I have created custom customer attribute successfully. Which are showing under account information tab of customer edit in admin.



I want to show them in my custom tab.







magento-2.1 php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 27 '17 at 12:25









Teja Bhagavan Kollepara

3,00641949




3,00641949










asked Jun 7 '17 at 13:36









Mohit chauhanMohit chauhan

34219




34219





bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • found the solution for this?

    – CompactCode
    Mar 29 '18 at 2:52











  • Any body know solution ?

    – amit_game
    Jul 31 '18 at 5:55











  • I need a solution, too.

    – skymeissner
    Sep 28 '18 at 13:07











  • the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

    – David Verholen
    Jan 11 at 21:12


















  • found the solution for this?

    – CompactCode
    Mar 29 '18 at 2:52











  • Any body know solution ?

    – amit_game
    Jul 31 '18 at 5:55











  • I need a solution, too.

    – skymeissner
    Sep 28 '18 at 13:07











  • the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

    – David Verholen
    Jan 11 at 21:12

















found the solution for this?

– CompactCode
Mar 29 '18 at 2:52





found the solution for this?

– CompactCode
Mar 29 '18 at 2:52













Any body know solution ?

– amit_game
Jul 31 '18 at 5:55





Any body know solution ?

– amit_game
Jul 31 '18 at 5:55













I need a solution, too.

– skymeissner
Sep 28 '18 at 13:07





I need a solution, too.

– skymeissner
Sep 28 '18 at 13:07













the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

– David Verholen
Jan 11 at 21:12






the attributes under the account information tab are rendered generically based on a setting you can add to the customer attribute (include in forms, it's an own mapping table). If you have a custom tab, you have to render it yourself, but the "how" depends on how you implemented the custom tab

– David Verholen
Jan 11 at 21:12











1 Answer
1






active

oldest

votes


















0














To create a new tab in the admin customer edit, create a xml in the following path



Step 1:




/app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml




<body>
<referenceBlock name="customer_form">
<block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
<action method="setTabLabel">
<argument name="label" xsi:type="string">Test Tab</argument>
</action>
</block>
</referenceBlock>
</body>


Step 2:
Create a block file in the below path to load the contents when the tab is clicked




/app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php




<?php

namespace VendornameModulenameBlockAdminhtmlEditTab;

use MagentoCustomerControllerRegistryConstants;

use MagentoUiComponentLayoutTabsTabInterface;

class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
null
*/
public function getCustomerId()

return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);

/**
* @return MagentoFrameworkPhrase
*/
public function getTabLabel()

return __(‘Tab label’);

/**
* @return MagentoFrameworkPhrase
*/
public function getTabTitle()

return __(‘Tab Title’);

/**
* @return bool
*/
public function canShowTab()

if ($this->getCustomerId())
return true;

return false;


/**
* @return bool
*/
public function isHidden()

if ($this->getCustomerId())
return false;

return true;

/**
* Tab class getter
*
* @return string
*/
public function getTabClass()

return '';

/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()

//replace the tab with the url you want
return $this->getUrl('test/*/test', ['_current' => true]);

/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()

return true;




Your new test tab will be added to customer edit left side menu.






share|improve this answer
























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f177902%2fhow-to-add-custom-customer-attribute-in-custom-tab-in-customer-edit-page-of-admi%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    To create a new tab in the admin customer edit, create a xml in the following path



    Step 1:




    /app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml




    <body>
    <referenceBlock name="customer_form">
    <block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
    <action method="setTabLabel">
    <argument name="label" xsi:type="string">Test Tab</argument>
    </action>
    </block>
    </referenceBlock>
    </body>


    Step 2:
    Create a block file in the below path to load the contents when the tab is clicked




    /app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php




    <?php

    namespace VendornameModulenameBlockAdminhtmlEditTab;

    use MagentoCustomerControllerRegistryConstants;

    use MagentoUiComponentLayoutTabsTabInterface;

    class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
    null
    */
    public function getCustomerId()

    return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);

    /**
    * @return MagentoFrameworkPhrase
    */
    public function getTabLabel()

    return __(‘Tab label’);

    /**
    * @return MagentoFrameworkPhrase
    */
    public function getTabTitle()

    return __(‘Tab Title’);

    /**
    * @return bool
    */
    public function canShowTab()

    if ($this->getCustomerId())
    return true;

    return false;


    /**
    * @return bool
    */
    public function isHidden()

    if ($this->getCustomerId())
    return false;

    return true;

    /**
    * Tab class getter
    *
    * @return string
    */
    public function getTabClass()

    return '';

    /**
    * Return URL link to Tab content
    *
    * @return string
    */
    public function getTabUrl()

    //replace the tab with the url you want
    return $this->getUrl('test/*/test', ['_current' => true]);

    /**
    * Tab should be loaded trough Ajax call
    *
    * @return bool
    */
    public function isAjaxLoaded()

    return true;




    Your new test tab will be added to customer edit left side menu.






    share|improve this answer





























      0














      To create a new tab in the admin customer edit, create a xml in the following path



      Step 1:




      /app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml




      <body>
      <referenceBlock name="customer_form">
      <block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
      <action method="setTabLabel">
      <argument name="label" xsi:type="string">Test Tab</argument>
      </action>
      </block>
      </referenceBlock>
      </body>


      Step 2:
      Create a block file in the below path to load the contents when the tab is clicked




      /app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php




      <?php

      namespace VendornameModulenameBlockAdminhtmlEditTab;

      use MagentoCustomerControllerRegistryConstants;

      use MagentoUiComponentLayoutTabsTabInterface;

      class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
      null
      */
      public function getCustomerId()

      return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);

      /**
      * @return MagentoFrameworkPhrase
      */
      public function getTabLabel()

      return __(‘Tab label’);

      /**
      * @return MagentoFrameworkPhrase
      */
      public function getTabTitle()

      return __(‘Tab Title’);

      /**
      * @return bool
      */
      public function canShowTab()

      if ($this->getCustomerId())
      return true;

      return false;


      /**
      * @return bool
      */
      public function isHidden()

      if ($this->getCustomerId())
      return false;

      return true;

      /**
      * Tab class getter
      *
      * @return string
      */
      public function getTabClass()

      return '';

      /**
      * Return URL link to Tab content
      *
      * @return string
      */
      public function getTabUrl()

      //replace the tab with the url you want
      return $this->getUrl('test/*/test', ['_current' => true]);

      /**
      * Tab should be loaded trough Ajax call
      *
      * @return bool
      */
      public function isAjaxLoaded()

      return true;




      Your new test tab will be added to customer edit left side menu.






      share|improve this answer



























        0












        0








        0







        To create a new tab in the admin customer edit, create a xml in the following path



        Step 1:




        /app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml




        <body>
        <referenceBlock name="customer_form">
        <block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
        <action method="setTabLabel">
        <argument name="label" xsi:type="string">Test Tab</argument>
        </action>
        </block>
        </referenceBlock>
        </body>


        Step 2:
        Create a block file in the below path to load the contents when the tab is clicked




        /app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php




        <?php

        namespace VendornameModulenameBlockAdminhtmlEditTab;

        use MagentoCustomerControllerRegistryConstants;

        use MagentoUiComponentLayoutTabsTabInterface;

        class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
        null
        */
        public function getCustomerId()

        return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);

        /**
        * @return MagentoFrameworkPhrase
        */
        public function getTabLabel()

        return __(‘Tab label’);

        /**
        * @return MagentoFrameworkPhrase
        */
        public function getTabTitle()

        return __(‘Tab Title’);

        /**
        * @return bool
        */
        public function canShowTab()

        if ($this->getCustomerId())
        return true;

        return false;


        /**
        * @return bool
        */
        public function isHidden()

        if ($this->getCustomerId())
        return false;

        return true;

        /**
        * Tab class getter
        *
        * @return string
        */
        public function getTabClass()

        return '';

        /**
        * Return URL link to Tab content
        *
        * @return string
        */
        public function getTabUrl()

        //replace the tab with the url you want
        return $this->getUrl('test/*/test', ['_current' => true]);

        /**
        * Tab should be loaded trough Ajax call
        *
        * @return bool
        */
        public function isAjaxLoaded()

        return true;




        Your new test tab will be added to customer edit left side menu.






        share|improve this answer















        To create a new tab in the admin customer edit, create a xml in the following path



        Step 1:




        /app/code/Vendorname/modulename/view/adminhtml/layout/customer_index_edit.xml




        <body>
        <referenceBlock name="customer_form">
        <block class="VendornameModulenameBlockAdminhtmlEditTabTest" name="customer_edit_tab_test" >
        <action method="setTabLabel">
        <argument name="label" xsi:type="string">Test Tab</argument>
        </action>
        </block>
        </referenceBlock>
        </body>


        Step 2:
        Create a block file in the below path to load the contents when the tab is clicked




        /app/code/Vendorname/Modulename/Block/Adminhtml/Edit/Tab/Test.php




        <?php

        namespace VendornameModulenameBlockAdminhtmlEditTab;

        use MagentoCustomerControllerRegistryConstants;

        use MagentoUiComponentLayoutTabsTabInterface;

        class Test extends MagentoFrameworkViewElementTemplate implements TabInterface
        null
        */
        public function getCustomerId()

        return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);

        /**
        * @return MagentoFrameworkPhrase
        */
        public function getTabLabel()

        return __(‘Tab label’);

        /**
        * @return MagentoFrameworkPhrase
        */
        public function getTabTitle()

        return __(‘Tab Title’);

        /**
        * @return bool
        */
        public function canShowTab()

        if ($this->getCustomerId())
        return true;

        return false;


        /**
        * @return bool
        */
        public function isHidden()

        if ($this->getCustomerId())
        return false;

        return true;

        /**
        * Tab class getter
        *
        * @return string
        */
        public function getTabClass()

        return '';

        /**
        * Return URL link to Tab content
        *
        * @return string
        */
        public function getTabUrl()

        //replace the tab with the url you want
        return $this->getUrl('test/*/test', ['_current' => true]);

        /**
        * Tab should be loaded trough Ajax call
        *
        * @return bool
        */
        public function isAjaxLoaded()

        return true;




        Your new test tab will be added to customer edit left side menu.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 31 at 7:20









        Rakesh Donga

        1,893316




        1,893316










        answered Jan 31 at 7:07









        nishunishu

        263




        263



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f177902%2fhow-to-add-custom-customer-attribute-in-custom-tab-in-customer-edit-page-of-admi%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

            Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»

            Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр