UI form in Magento 2
-
16-12-2020 - |
Question
In the below code which path or which file name have to give in 7 th line instead of slide. Because i am creating Ui form in backend
<field name="name">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Name</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">slide</item>
</item>
</argument>
</field>
Solution
Consider the module structure like Vendor/Module/Component - according to the hierarchy you should place component in your item name="source".In your case it would be the following:
<item name="source" xsi:type="string">homeslider</item>
OTHER TIPS
You need to follow the core magento xml hierarchy root directory then go to vendor/magento/Module-name/
You can also refer to this url
http://devdocs.magento.com/guides/v2.1/ui_comp_guide/components/ui-form.html
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange