M2 | Can we create one field by dataprovider and one field by uicmponent in single group at Product Creation Page?

magento.stackexchange https://magento.stackexchange.com/questions/273032

문제

I have created toggle button by uicomponent in one group and some other fields by dataprovider way in another group.

Can I get toggle button into group created by dataprovider way. As it is not possible toggle checkbox to be created without uicomponent.

enter image description here

도움이 되었습니까?

해결책

Toggle checkbox can be created via DataProvider as well. DataProvider (PHP) and UI Component (XML) files are two ways to generate the same configuration to render the elements.

Therefore you can create any kind of elements in both ways. Just need to make sure your code use the correct format and don't miss the required config.

In your case, you can try to move the config for toggle checkbox from XML file to your meta array in your DataProvider with the same key/values.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top