0

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>
2

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>
4
  • I am new to magento . Would you don't mind please explain what is the component ? ...
    – Jaisa
    Nov 13 '17 at 11:42
  • Yourcompaname/Yourmodulename/(here any folder you made for you module is component ). If we talk about the cms module then , it will be Magento/Cms/Page ... in this case page is component.
    – Verdu
    Nov 13 '17 at 11:48
  • Jai is a vendor name and HomeSlider is a module name. I have Controller, Model,etc,view,Ui,Setup, Block... Now can you tell me
    – Jaisa
    Nov 13 '17 at 11:56
  • then place homeslider in your item name="source"
    – Verdu
    Nov 13 '17 at 11:59
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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