2

i try this code but it not working with tab in form ui component:

<item name="additionalClasses" xsi:type="array">
    <item name="my-custom-class" xsi:type="boolean">true</item>
</item>
4
  • 1
    what you want to exactly? May 24, 2019 at 10:15
  • i want add class to my custom tab in form ui component?
    – NewBie
    May 24, 2019 at 10:17
  • Do you want to additionClass for form filed or left side custom tab? May 24, 2019 at 10:57
  • left side custom tab
    – NewBie
    May 24, 2019 at 10:58

2 Answers 2

1

Try this code to add additonalclasses for tab in form ui component.

More information in details, Visit, How to additonalClasses for Tab in Magento 2 UI component form

<fieldset name="address" sortOrder="30">
     <settings>
        <additionalClasses>
            <class name="custom-address">true</class>
        </additionalClasses>
    </settings>
</fieldset>

Hope this helps. Thanks.

0

Try using following example:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="websites" sortOrder="30">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="additionalClasses" xsi:type="string">admin__field-medium</item>
            </item>
        </argument>
    </fieldset>
</form>
6
  • It does not working with Magento 2.3 :(
    – NewBie
    May 24, 2019 at 10:54
  • This is tested code in 2.3 :) Makesure you use this correctly
    – Sohel Rana
    May 24, 2019 at 10:55
  • I tried it but nothing happened
    – NewBie
    May 24, 2019 at 10:56
  • Your answer is right @SohelRana but it's for form filed... it want for custom left tab May 24, 2019 at 10:59
  • yes, I apologize for not clarifying
    – NewBie
    May 24, 2019 at 11:01

Your Answer

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

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