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>
Nikolas
2,30113 silver badges17 bronze badges
asked May 24, 2019 at 10:01
4
  • 1
    what you want to exactly? Commented May 24, 2019 at 10:15
  • i want add class to my custom tab in form ui component? Commented May 24, 2019 at 10:17
  • Do you want to additionClass for form filed or left side custom tab? Commented May 24, 2019 at 10:57
  • left side custom tab Commented 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.

answered May 24, 2019 at 19:59
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>
answered May 24, 2019 at 10:49
6
  • It does not working with Magento 2.3 :( Commented May 24, 2019 at 10:54
  • This is tested code in 2.3 :) Makesure you use this correctly Commented May 24, 2019 at 10:55
  • I tried it but nothing happened Commented May 24, 2019 at 10:56
  • Your answer is right @SohelRana but it's for form filed... it want for custom left tab Commented May 24, 2019 at 10:59
  • yes, I apologize for not clarifying Commented May 24, 2019 at 11:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.